Cryptography.sha1

From GiderosMobile

Available since: Gideros 2023.12
Class: Cryptography

Description

sha1 encode some data.

(string) = Cryptography.sha1(data)

Parameters

data: (string) the data to be sha1 encoded

Return values

Returns (string) sha1 encoded string

Example

local data = Cryptography.sha1("password")
print((" %02x"):rep(#data):format(data:byte(1, #data)))
-- output: 5b aa 61 e4 c9 b9 3f 3f 06 82 25 0b 6c f8 33 1b 7e e6 8f d8