Garry's Mod Wiki

util.Base64Encode

util.Base64Encode

  string util.Base64Encode( string str, boolean inline )

Description

Encodes the specified string to base64.

Unless disabled with the inline argument, the Base64 returned is compliant to the RFC 2045 standard. This means it will have a line break after every 76th character.

Arguments

1 string str
String to encode.
2 boolean inline
true to disable RFC 2045 compliance (newline every 76th character)

Returns

1 string
Base 64 encoded string.

Example

Encodes a string

local encoded = util.Base64Encode( "Base64 Encoding" ) print(encoded)
Output: QmFzZTY0IEVuY29kaW5n

Special Pages


Wikis

?

Render Time: 46ms

DB GetPage 26
Generate Html 4
SaveChanges (1) 6
Render Body 0
Render Sidebar 7