# [Ride v4 and v3] Encoding functions
⚠️ This is the documentation for the Standard library version 4 and 3. We recommend to use version 6. Go to version 6
Name | Description | Complexity |
---|---|---|
toBase16String(ByteVector): String | Encodes array of bytes to base16 string | 10 |
toBase58String(ByteVector): String | Encodes array of bytes to base58 string | 10 for Standard Library version 3 3 for Standard Library version 4 |
toBase64String(ByteVector): String | Encodes array of bytes to base64 string | 10 for Standard Library version 3 35 for Standard Library version 4 |
# toBase16String(ByteVector): String
Encodes an array of bytes to a base16 string.
toBase16String(bytes: ByteVector): String
# Parameters
Parameter | Description |
---|---|
bytes : ByteVector | Array of bytes to encode |
# Examples
toBase16String("Ride".toBytes()) # Returns "52696465"
toBase16String(base16'52696465') # Returns "52696465"
# toBase58String(ByteVector): String
Encodes an array of bytes to a base58 string.
toBase58String(bytes: ByteVector): String
# Parameters
Parameter | Description |
---|---|
bytes : ByteVector | Array of bytes to encode |
# Examples
toBase58String("Ride".toBytes()) # Returns "37BPKA"
toBase58String(base58'37BPKA') # Returns "37BPKA"
# toBase64String(ByteVector): String
Encodes an array of bytes to a base64 string.
toBase64String(bytes: ByteVector): String
# Parameters
Parameter | Description |
---|---|
bytes : ByteVector | Array of bytes to encode |
# Examples
toBase64String("Ride".toBytes()) # Returns "UmlkZQ=="
toBase64String(base64'UmlkZQ==') # Returns "UmlkZQ=="