llBase64ToString
function
Function syntax
string llBase64ToString(string str// Base64-encoded string to decode.
);- Returns
string- Energy
- 10
Decodes the Base64-encoded string str into a conventional string, interpreting the bytes as a UTF-8 character sequence. Unprintable characters are converted to question marks.
Returns a string that is the Base64 str decoded into a conventional string, interpreting the Base64-encoded bytes as UTF-8 character sequence.
string result = llBase64ToString("");Caveats
Section titled “Caveats”- If the conversion creates any unprintable characters, they are converted to spaces.
- Converts invalid characters into question marks (’?’).
Examples
Section titled “Examples”Example 1
default { state_entry() { string test = llBase64ToString("U2VjcmV0Ok9wZW4="); llSay(0,test ); }}This can be used in Basic Authentication, such as this login:
GET / HTTP/1.1User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2)Host: www.example.comAuthorization: Basic U2VjcmV0Ok9wZW4=Example 3
llBase64ToString("U2VjcmV0Ok9wZW4="); //will return the string "Secret:Open"See also
Section titled “See also”Functions
Section titled “Functions”llXorBase64— Article also discusses xor based Cryptography.llStringToBase64llBase64ToInteger
Articles
Section titled “Articles”Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.