Base64Decode: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (fix)
(Set base64Decode deprecated as #3312)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server client function}}
{{Server client function}}
{{New feature/item|9.06056|1.3.5|6056|
This function returns the decrypted data from [https://en.wikipedia.org/wiki/Base64 base64] representation of the encrypted block
This function returns the decrypted data from [https://en.wikipedia.org/wiki/Base64 base64] representation of the encrypted block
}}
 
{{deprecated|decodeString}}


==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 = base64decode("SGVsbG8sIHdvcmxkIQ==")
local k = base64Decode("SGVsbG8sIHdvcmxkIQ==")
outputConsole(k)
outputConsole(k)
--Output: Hello, world!
--Output: Hello, world!

Latest revision as of 19:54, 19 February 2024

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


Emblem-important.png This function is deprecated. This means that its use is discouraged and that it might not exist in future versions.

Please use decodeString instead.


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