Skip to main content
Version: 9.2605.x.x RR

Base64

Class function

nevis.crypto.base64.new()

Creates an object that can use Base64 encoding and decoding for data.

Sample:

base64 = nevis.crypto.base64.new()

Object methods

base64:encode(data)

Encodes the given string to Base64. Returns the encoded string.

Sample:

result = base64:encode("hello world")

base64:decode(data)

Decodes the given Base64-encoded string. Returns the decoded string.

Sample:

plain = base64:decode("aGVsbG8gd29ybGQK")

Example

base64 = nevis.crypto.base64.new()
result = base64:encode("hello world")
plain = base64:decode("aGVsbG8gd29ybGQK")