Skip to content

Encode/decode "Base64url Encoding" format of JSON Web Signature (JWS) RFC7517.

License

Notifications You must be signed in to change notification settings

Attestto-com/base64url-universal

 
 

Repository files navigation

base64url-universal

Encode/Decode input according to the "Base64url Encoding" format as specified in JSON Web Signature (JWS) RFC7517. A URL safe character set is used and trailing '=', line breaks, whitespace, and other characters are omitted.

encode(input) ⇒ string

Encodes input according to the "Base64url Encoding" format as specified in JSON Web Signature (JWS) RFC7517. A URL safe character set is used and trailing '=', line breaks, whitespace, and other characters are omitted.

Kind: Exported function
Returns: string - the encoded value.

Param Type Description
input Uint8Array | string the data to encode.

decode(input) ⇒ Uint8Array

Decodes input according to the "Base64url Encoding" format as specified in JSON Web Signature (JWS) RFC7517. A URL safe character set is used and trailing '=', line breaks, whitespace, and other characters are omitted.

Kind: Exported function
Returns: Uint8Array - the decoded value.

Param Type Description
input string the data to decode.

About

Encode/decode "Base64url Encoding" format of JSON Web Signature (JWS) RFC7517.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%