Package net.corda.v5.base.util
Class EncodingUtils
-
- All Implemented Interfaces:
public final class EncodingUtils
A wrapper class that has been introduced in the migration from Kotlin to Java to house static functions.
-
-
Method Summary
Modifier and Type Method Description static String
toBase64(@NotNull() Array<byte> bytes)
Convert a byte array to a Base58 encoded String. static String
toBase58(@NotNull() Array<byte> bytes)
Convert a byte array to a Base64 encoded String. static String
toHex(@NotNull() Array<byte> bytes)
Convert a byte array to a hex (Base16) capitalized encoded String. static String
base58ToRealString(@NotNull() String encoded)
Base58-String to the actual real String, that is "JxF12TrwUP45BMd" to "Hello World". static String
base64ToRealString(@NotNull() String encoded)
Base64-String to the actual real String, that is "SGVsbG8gV29ybGQ=" to "Hello World". static String
hexToRealString(@NotNull() String encoded)
HEX-String to the actual real String, that is "48656C6C6F20576F726C64" to "Hello World". static Array<byte>
base58ToByteArray(@NotNull() String encoded)
static Array<byte>
base64ToByteArray(@NotNull() String encoded)
static Array<byte>
hexToByteArray(@NotNull() String encoded)
Hex-String to byte[]. static String
base58toBase64(@NotNull() String input)
Encoding changer. static String
base58toHex(@NotNull() String input)
Encoding changer. static String
base64toBase58(@NotNull() String input)
Encoding changer. static String
base64toHex(@NotNull() String input)
Encoding changer. static String
hexToBase58(@NotNull() String input)
Encoding changer. static String
hexToBase64(@NotNull() String input)
Encoding changer. -
-
Method Detail
-
toBase64
@NotNull() static String toBase64(@NotNull() Array<byte> bytes)
Convert a byte array to a Base58 encoded String.
-
toBase58
@NotNull() static String toBase58(@NotNull() Array<byte> bytes)
Convert a byte array to a Base64 encoded String.
-
toHex
@NotNull() static String toHex(@NotNull() Array<byte> bytes)
Convert a byte array to a hex (Base16) capitalized encoded String.
-
base58ToRealString
@NotNull() static String base58ToRealString(@NotNull() String encoded)
Base58-String to the actual real String, that is "JxF12TrwUP45BMd" to "Hello World".
-
base64ToRealString
@NotNull() static String base64ToRealString(@NotNull() String encoded)
Base64-String to the actual real String, that is "SGVsbG8gV29ybGQ=" to "Hello World".
-
hexToRealString
@NotNull() static String hexToRealString(@NotNull() String encoded)
HEX-String to the actual real String, that is "48656C6C6F20576F726C64" to "Hello World".
-
base58ToByteArray
@NotNull() static Array<byte> base58ToByteArray(@NotNull() String encoded)
-
base64ToByteArray
@NotNull() static Array<byte> base64ToByteArray(@NotNull() String encoded)
-
hexToByteArray
@NotNull() static Array<byte> hexToByteArray(@NotNull() String encoded)
Hex-String to byte[]. Accept any hex form (capitalized, lowercase, mixed).
-
base58toBase64
@NotNull() static String base58toBase64(@NotNull() String input)
-
base58toHex
@NotNull() static String base58toHex(@NotNull() String input)
-
base64toBase58
@NotNull() static String base64toBase58(@NotNull() String input)
-
base64toHex
@NotNull() static String base64toHex(@NotNull() String input)
-
hexToBase58
@NotNull() static String hexToBase58(@NotNull() String input)
-
hexToBase64
@NotNull() static String hexToBase64(@NotNull() String input)
-
-
-
-