Cypto functions:


Base64:

Lib.Sys.Crypto.Base64.encode(bytes, complement)

encode Lib bytes object using Base64 encoding

bytes - Library Bytes object 

complement - if equal true function add '=' or '==' to the end of result string 

Lib.Sys.Crypto.Base64.decode(string, complement)

decode Base64 string and return Lib bytes

string - Base64 string

complement - if equal true then string has '=' or '==' ending


Md5:

Lib.Sys.Crypto.Md5.encode(string)

encode string using Md5

string - string for encoding


Sha1:

Lib.Sys.Crypto.Sha1.encode(string)

encode string using Sha1

string - string for encoding


Sha224:

Lib.Sys.Crypto.Sha224.encode(string)

encode string using Sha224

string - string for encoding


Sha256:

Lib.Sys.Crypto.Sha256.encode(string)

encode string using Sha256

string - string for encoding


Examples:


print(Lib.Sys.Crypto.Base64.encode( Lib.Sys.IO.Bytes.ofString("test"), true))

print(Lib.Sys.Crypto.Base64.decode("dGVzdA==", true).toString())


print(Lib.Sys.Crypto.Md5.encode("test"))


print(Lib.Sys.Crypto.Sha1.encode('test'))

print(Lib.Sys.Crypto.Sha224.encode('test'))

print(Lib.Sys.Crypto.Sha256.encode('test'))

Created with the Personal Edition of HelpNDoc: Generate EPub eBooks with ease