Functions - encoding

byteArrayToString

Converts given byte array to a string.

decodeBase64

Decode Base64 encoded string into byte array.

decodeBase64Url

Decode Base64 URL encoded string into byte array.

decodeHex

Decode Hex encoded string into byte array.

encodeBase64

Returns the Base64 encoded string value of the given byte array.

encodeBase64Url

Returns the Base64 URL encoded string value of the given byte array.

encodeHex

Returns the Hex encoded string value of the given byte array.

byteArrayToString

(byte[] content, string encoding)

returns string

Converts given byte array to a string.

Parameters

  • content byte[]
  • Byte array content to be converted

  • encoding string - utf-8
  • Encoding to used in byte array conversion to string

  • Return Type

    (string)
  • String representation of the given byte array

decodeBase64

(string input)

returns byte[] | EncodingError

Decode Base64 encoded string into byte array.

Parameters

  • input string
  • Value to be decoded

  • Return Type

    (byte[] | EncodingError)
  • Decoded output or EncodingError if input is not a valid Base64 value

decodeBase64Url

(string input)

returns byte[] | EncodingError

Decode Base64 URL encoded string into byte array.

Parameters

  • input string
  • Value to be decoded

  • Return Type

    (byte[] | EncodingError)
  • Decoded output or EncodingError if input is not a valid Base64 URL encoded value

decodeHex

(string input)

returns byte[] | EncodingError

Decode Hex encoded string into byte array.

Parameters

  • input string
  • Value to be decoded

  • Return Type

    (byte[] | EncodingError)
  • Decoded output or EncodingError if input is not a valid Hex value

encodeBase64

(byte[] input)

returns string

Returns the Base64 encoded string value of the given byte array.

Parameters

  • input byte[]
  • Value to be encoded

  • Return Type

    (string)
  • Encoded output

encodeBase64Url

(byte[] input)

returns string

Returns the Base64 URL encoded string value of the given byte array.

Parameters

  • input byte[]
  • Value to be encoded

  • Return Type

    (string)
  • Encoded output

encodeHex

(byte[] input)

returns string

Returns the Hex encoded string value of the given byte array.

Parameters

  • input byte[]
  • Value to be encoded

  • Return Type

    (string)
  • Encoded output