Base64Encode: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (fix)
mNo edit summary
Line 7: Line 7:
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
string base64encode ( string data )
string base64Encode ( string data )
</syntaxhighlight>
</syntaxhighlight>


Line 18: Line 18:
==Example==
==Example==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
local k = base64encode("Hello, world!")
local k = base64Encode("Hello, world!")
outputConsole(k)
outputConsole(k)
--Output: SGVsbG8sIHdvcmxkIQ==
--Output: SGVsbG8sIHdvcmxkIQ==

Revision as of 14:39, 14 March 2014

ADDED/UPDATED IN VERSION 1.3.5 r6056:

This function returns the base64 representation of the encrypted block of data

Syntax

string base64Encode ( string data )

Required arguments

  • data: The block of data you want to encrypt

Returns

Returns the base64 representation of the encrypted data if the encryption process was successfully completed, false otherwise.

Example

local k = base64Encode("Hello, world!")
outputConsole(k)
--Output: SGVsbG8sIHdvcmxkIQ==

See Also