Difference between revisions of "LlBase64ToString"

From Second Life Wiki
Jump to navigation Jump to search
m (Undo revision 448522 by Wiki Scribe (Talk))
(spacing)
Line 1: Line 1:
{{LSL_Function
{{LSL Function
|func=llBase64ToString|func_id=261|func_sleep=0.0|func_energy=10.0
|func=llBase64ToString|func_id=261|func_sleep=0.0|func_energy=10.0
|return_type=string
|return_type=string

Revision as of 13:48, 17 February 2012

Summary

Function: string llBase64ToString( string str );

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 ('?').
All Issues ~ Search JIRA for related Bugs

Examples

<lsl>default {

   state_entry()
   {
       string test = llBase64ToString("U2VjcmV0Ok9wZW4=");
       llSay(0,test );
   }

}</lsl>

This can be used in "Wikipedia logo"Basic Authentication, such as this login:

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>llBase64ToString("U2VjcmV0Ok9wZW4="); //will return the string "Secret:Open"</lsl>

See Also

Functions

•  llStringToBase64
•  llBase64ToInteger

Articles

•  Base64

Deep Notes

Search JIRA for related Issues

Signature

function string llBase64ToString( string str );