Difference between revisions of "LlBase64ToString"
Jump to navigation
Jump to search
All Issues ~ Search JIRA for related Bugs
m (Add link to Wikipedia abount Basic Authentication) |
Wiki Scribe (talk | contribs) m (Robot: <pre> -> <lsl>) |
||
Line 17: | Line 17: | ||
This can be used in {{Wikipedia|Basic access authentication|Basic Authentication}}, such as this login: | This can be used in {{Wikipedia|Basic access authentication|Basic Authentication}}, such as this login: | ||
< | <lsl> | ||
GET / HTTP/1.1 | GET / HTTP/1.1 | ||
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2) | User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2) | ||
Host: www.example.com | Host: www.example.com | ||
Authorization: Basic U2VjcmV0Ok9wZW4= | Authorization: Basic U2VjcmV0Ok9wZW4= | ||
</ | </lsl> | ||
<lsl>llBase64ToString("U2VjcmV0Ok9wZW4="); //will return the string "Secret:Open"</lsl> | <lsl>llBase64ToString("U2VjcmV0Ok9wZW4="); //will return the string "Secret:Open"</lsl> | ||
|helpers | |helpers |
Revision as of 19:59, 4 August 2009
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Summary
Function: string llBase64ToString( string str );261 | Function ID |
0.0 | Forced Delay |
10.0 | Energy |
Returns a string that is the Base64 str decoded into a conventional string.
• string | str | – | Base64 string |
Caveats
- If the conversion creates any unprintable characters, they are converted to spaces.
- Converts invalid characters into question marks ('?').
Examples
<lsl>default {
state_entry() { string test = llBase64ToString("U2VjcmV0Ok9wZW4="); llSay(0,test ); }
}</lsl>
This can be used in Basic Authentication, such as this login: <lsl> GET / HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.2) Host: www.example.com Authorization: Basic U2VjcmV0Ok9wZW4= </lsl>
<lsl>llBase64ToString("U2VjcmV0Ok9wZW4="); //will return the string "Secret:Open"</lsl>