LSL Wiki Mirror 7-7-7 : Base64

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings ::

Base64 Content-Transfer-Encoding


Base64 is a format that allows the storing of arbitrary sequences of octets (8 bits) using a "printable" chararacter set of 64 characters ([A-Z][a-z][0-9]+/). Or, in simpler terms, it allows safe transporting of binary data through a plaintext medium like email. Base64 is not encryption.

See RFC 1341 section 5.2 for the specification.

Example
Plaintext Base64
"Never fear, Smith is here." "TmV2ZXIgZmVhciwgU21pdGggaXMgaGVyZS4="

Functions
Function Description
llBase64ToInteger Decoding
llIntegerToBase64 Encoding
llBase64ToString Decoding
llStringToBase64 Encoding
llXorBase64StringsCorrect Encryption/Decryption (new version)
llXorBase64Strings Encryption/Decryption (depreceated)

//Validate that a string is in fact a base64 string.
integer IsBase64(string a)
{
    return a == llXorBase64StringsCorrect(a, "AAAA");
}//written by Strife Onizuka

Note that unlike Base64 decoders in some other languages, llBase64ToString will stop decoding at the first whitespace character it encounters.


Functions | Crypto
There is no comment on this page. [Display comments/form]