Goto main content

base64_encode

Encodes data with MIME base64

BASE64_ENCODE

NAME

base64_encode - Encodes data with MIME base64

SYNOPSIS

base64_encode(data,modified)

PARAMETERS

data The data to encode. modified Modified will work with extenso only. (By default: true)

DESCRIPTION

The Base64 is an encoding that represents binary-data in an ASCII string format. It translates the data into a 64-characters base representation. It is mostly used for emails via MIME (multipurpose internet mail extensions). This program is used to encode arbitrary octet sequences into a form that satisfies the rules of 7bit. (source: http://en.wikipedia.org/wiki/Base64)

RETURN

string
The encoded data, as a string.
modified
base64_decode can work with different character based on the modified flag which is a boolean. By default the value is true.

if modified is false then the caracter set supported are ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789:-
 
If modified is true then the character set supported are ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/

EXAMPLES

Note: In the following examples, the _ between the { should be removed to make it work.

in: res={_{base64_encode("some text to be coverted",true)}}.
out: res=c29tZSB0ZXh0IHRvIGJlIGNvdmVydGVk.

AUTHOR

Written by Pusnei Sergey and Caroline Laplante, <sergey@sednove.com>

Modify by Pierre Laplante <laplante@sednove.com>

Other topics in Extenso Components

© 2024 extenso Inc. All rights reserved.