Base64UrlEncode

Description

Encodes a blob value using Base64Url encoder. Base64UrlEncode is an improved Base64Encode for URL. Base64UrlEncode and Base64Encode character sets are the same except for the last set of characters where Base64Url replaces "+" with "-" and "/" with "_".

Applies to

CoderObject object

Syntax

coder.Base64UrlEncode ( variable )

Argument

Description

coder

The name of the CoderObject object.

variable

A blob whose value is the data you want to encode with Base64Url encoder.

When using the system blob function to convert a string to a blob, it is recommended to specify its encoding argument to be EncodingANSI! (for English characters only) or EncodingUTF8!, otherwise, the default EncodingUTF16LE! will be used.


Return value

String. Returns the result of the encoding if it succeeds. If any argument's value is null, the method returns null. If an error occurs, throw the exception.

Examples

This statement encodes the data using Base64Url and returns the encoded data.

CoderObject lco_Code
Blob lbb_Data
String ls_Return

lco_Code = Create CoderObject

lbb_Data = Blob ( "Test Base64Url", EncodingUTF8! )
ls_Return = lco_Code.Base64UrlEncode(lbb_Data)

Destroy ( lco_Code )

See also

HexDecode

HexEncode

Base32Decode

Base32Encode

Base64Encode

Base64Decode

Base64UrlDecode

UrlEncode

UrlDecode