Functions - encoding

decodeBase64Url

Decode Base64 URL encoded string into byte array.

decodeUriComponent

Decodes the given URI component.

encodeBase64Url

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

encodeUriComponent

Encodes the given URI component.

decodeBase64Url

(string input)

returns byte[] | Error

Decode Base64 URL encoded string into byte array.

Parameters

  • input string
  • Value to be decoded

  • Return Type

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

decodeUriComponent

(string uriComponent, string charset)

returns string | Error

Decodes the given URI component.

Parameters

  • uriComponent string
  • URI component to be decoded

  • charset string
  • Character set from which the URI is decoded

  • Return Type

    (string | Error)
  • The string Value of the decoded URI component or an Error that occurred during decoding

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

encodeUriComponent

(string uriComponent, string charset)

returns string | Error

Encodes the given URI component.

Parameters

  • uriComponent string
  • URI component to be encoded

  • charset string
  • Charactor set that URI to be encoded in

  • Return Type

    (string | Error)
  • The string Value of the encoded URI component or an Error that occurred during encoding