Base64Decode: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (moved Base64Decode to Base64decode: It's not Decode, it's decode.)
m (fix)
Line 7: Line 7:
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
string base64Decode(string data)
string base64decode(string data)
</syntaxhighlight>
</syntaxhighlight>


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

Revision as of 14:38, 14 March 2014

ADDED/UPDATED IN VERSION 1.3.5 r6056:

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

Syntax

string base64decode(string data)

Required arguments

  • data: The block of data you want to decrypt

Returns

Returns the decrypted data from base64 representation of the encrypted block if the decryption process was successfully completed, false otherwise.

Example

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

See Also