Base64Encode: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (replace "encrypted" with "encoded")
(Set base64Encode deprecated as #3312)
 
Line 2: Line 2:
{{Server client function}}
{{Server client function}}
This function returns the [https://en.wikipedia.org/wiki/Base64 base64] representation of the encoded block of data
This function returns the [https://en.wikipedia.org/wiki/Base64 base64] representation of the encoded block of data
{{deprecated|encodeString}}


==Syntax==
==Syntax==

Latest revision as of 19:53, 19 February 2024

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


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 encodeString instead.


Syntax

string base64Encode ( string data )

Required arguments

  • data: The block of data you want to encode

Returns

Returns the base64 representation of the encoded data if the encoding process was successfully completed, false otherwise.

Example

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

See Also