Codeunit "Base64 Convert"
Converts text to and from its base-64 representation.
Properties
| Name | Value |
|---|---|
| Access | Public |
| SingleInstance | True |
| InherentEntitlements | X |
| InherentPermissions | X |
Methods
ToBase64
Converts the value of the input string to its equivalent string representation that is encoded with base-64 digits.
procedure ToBase64(String: Text): Text
Parameters
| Name | Type | Description |
|---|---|---|
| String | Text |
The string to convert. |
Returns
| Type | Description |
|---|---|
| Text |
The string representation, in base-64, of the input string. |
ToBase64
Converts the value of the input secret string to its equivalent secret string representation that is encoded with base-64 digits.
procedure ToBase64(SecretString: SecretText): SecretText
Parameters
| Name | Type | Description |
|---|---|---|
| SecretString | SecretText |
The secret string to convert. |
Returns
| Type | Description |
|---|---|
| SecretText |
The secret string representation, in base-64, of the input secret string. |
ToBase64
Converts the value of the input string to its equivalent string representation that is encoded with base-64 digits.
procedure ToBase64(String: Text, TextEncoding: TextEncoding): Text
Parameters
| Name | Type | Description |
|---|---|---|
| String | Text |
The string to convert. |
| TextEncoding | TextEncoding |
The TextEncoding for the input string. |
Returns
| Type | Description |
|---|---|
| Text |
The string representation, in base-64, of the input string. |
ToBase64
Converts the value of the input string to its equivalent string representation that is encoded with base-64 digits.
procedure ToBase64(String: Text, TextEncoding: TextEncoding, Codepage: Integer): Text
Parameters
| Name | Type | Description |
|---|---|---|
| String | Text |
The string to convert. |
| TextEncoding | TextEncoding |
The TextEncoding for the input string. |
| Codepage | Integer |
The Codepage if TextEncoding is MsDos or Windows. |
Returns
| Type | Description |
|---|---|
| Text |
The string representation, in base-64, of the input string. |
ToBase64
Converts the value of the input string to its equivalent string representation that is encoded with base-64 digits.
procedure ToBase64(String: Text, InsertLineBreaks: Boolean): Text
Parameters
| Name | Type | Description |
|---|---|---|
| String | Text |
The string to convert. |
| InsertLineBreaks | Boolean |
Specifies whether line breaks are inserted in the output. If true, inserts line breaks after every 76 characters. |
Returns
| Type | Description |
|---|---|
| Text |
The string representation, in base-64, of the input string. |
ToBase64
Converts the value of the input string to its equivalent string representation that is encoded with base-64 digits.
procedure ToBase64(String: Text, InsertLineBreaks: Boolean, TextEncoding: TextEncoding, Codepage: Integer): Text
Parameters
| Name | Type | Description |
|---|---|---|
| String | Text |
The string to convert. |
| InsertLineBreaks | Boolean |
Specifies whether line breaks are inserted in the output. If true, inserts line breaks after every 76 characters. |
| TextEncoding | TextEncoding |
The TextEncoding for the input string. |
| Codepage | Integer |
The Codepage if TextEncoding is MsDos or Windows. |
Returns
| Type | Description |
|---|---|
| Text |
The string representation, in base-64, of the input string. |
ToBase64
Converts the value of the input stream to its equivalent string representation that is encoded with base-64 digits.
procedure ToBase64(InStream: InStream): Text
Parameters
| Name | Type | Description |
|---|---|---|
| InStream | InStream |
The stream to read the input from. |
Returns
| Type | Description |
|---|---|
| Text |
The string representation, in base-64, of the input string. |
ToBase64
Converts the value of the input stream to its equivalent string representation that is encoded with base-64 digits.
procedure ToBase64(InStream: InStream, InsertLineBreaks: Boolean): Text
Parameters
| Name | Type | Description |
|---|---|---|
| InStream | InStream |
The stream to read the input from. |
| InsertLineBreaks | Boolean |
Specifies whether line breaks are inserted in the output. If true, inserts line breaks after every 76 characters. |
Returns
| Type | Description |
|---|---|
| Text |
The string representation, in base-64, of the input string. |
ToBase64Url
Converts the value of the input string to its equivalent string representation that is encoded with base64 URL-safe characters.
procedure ToBase64Url(String: Text): Text
Parameters
| Name | Type | Description |
|---|---|---|
| String | Text |
The string to convert. |
Returns
| Type | Description |
|---|---|
| Text |
The string representation, in base64url, of the input string. |
ToBase64Url
Converts the value of the input secret string to its equivalent secret string representation that is encoded with base64 URL-safe characters.
procedure ToBase64Url(SecretString: SecretText): SecretText
Parameters
| Name | Type | Description |
|---|---|---|
| SecretString | SecretText |
The secret string to convert. |
Returns
| Type | Description |
|---|---|
| SecretText |
The secret string representation, in base64url, of the input secret string. |
ToBase64Url
Converts the value of the input string to its equivalent string representation that is encoded with base64 URL-safe characters.
procedure ToBase64Url(String: Text, TextEncoding: TextEncoding): Text
Parameters
| Name | Type | Description |
|---|---|---|
| String | Text |
The string to convert. |
| TextEncoding | TextEncoding |
The TextEncoding for the input string. |
Returns
| Type | Description |
|---|---|
| Text |
The string representation, in base64url, of the input string. |
ToBase64Url
Converts the value of the input string to its equivalent string representation that is encoded with base64 URL-safe characters.
procedure ToBase64Url(String: Text, TextEncoding: TextEncoding, Codepage: Integer): Text
Parameters
| Name | Type | Description |
|---|---|---|
| String | Text |
The string to convert. |
| TextEncoding | TextEncoding |
The TextEncoding for the input string. |
| Codepage | Integer |
The Codepage if TextEncoding is MsDos or Windows. |
Returns
| Type | Description |
|---|---|
| Text |
The string representation, in base64url, of the input string. |
ToBase64Url
Converts the value of the input stream to its equivalent string representation that is encoded with base64 URL-safe characters.
procedure ToBase64Url(InStream: InStream): Text
Parameters
| Name | Type | Description |
|---|---|---|
| InStream | InStream |
The stream to read the input from. |
Returns
| Type | Description |
|---|---|
| Text |
The string representation, in base64url, of the input string. |
FromBase64
Converts the specified string, which encodes binary data as base-64 digits, to an equivalent regular string.
procedure FromBase64(Base64String: Text): Text
Parameters
| Name | Type | Description |
|---|---|---|
| Base64String | Text |
The string to convert. |
Returns
| Type | Description |
|---|---|
| Text |
Regular string that is equivalent to the input base-64 string. |
FromBase64
Converts the specified secret string, which encodes binary data as base-64 digits, to an equivalent regular secret string.
procedure FromBase64(Base64SecretString: SecretText): SecretText
Parameters
| Name | Type | Description |
|---|---|---|
| Base64SecretString | SecretText |
The secret string to convert. |
Returns
| Type | Description |
|---|---|
| SecretText |
Regular secret string that is equivalent to the input base-64 secret string. |
FromBase64
Converts the specified string, which encodes binary data as base-64 digits, to an equivalent regular string.
procedure FromBase64(Base64String: Text, TextEncoding: TextEncoding): Text
Parameters
| Name | Type | Description |
|---|---|---|
| Base64String | Text |
The string to convert. |
| TextEncoding | TextEncoding |
The TextEncoding for the input string. |
Returns
| Type | Description |
|---|---|
| Text |
Regular string that is equivalent to the input base-64 string. |
FromBase64
Converts the specified string, which encodes binary data as base-64 digits, to an equivalent regular string.
procedure FromBase64(Base64String: Text, TextEncoding: TextEncoding, Codepage: Integer): Text
Parameters
| Name | Type | Description |
|---|---|---|
| Base64String | Text |
The string to convert. |
| TextEncoding | TextEncoding |
The TextEncoding for the inout string. |
| Codepage | Integer |
The Codepage if TextEncoding is MsDos or Windows. |
Returns
| Type | Description |
|---|---|
| Text |
Regular string that is equivalent to the input base-64 string. |
FromBase64
Converts the specified string, which encodes binary data as base-64 digits, to an equivalent regular string.
procedure FromBase64(Base64String: Text, OutStream: OutStream)
Parameters
| Name | Type | Description |
|---|---|---|
| Base64String | Text |
The string to convert. |
| OutStream | OutStream |
The stream to write the output to. |