Security module
Security module description
The module provides access to cryptographic functions.
Security module API ( require "security"
)
Functions
Return | Name and parameters |
---|---|
md5 hash | md5( data ) |
sha1 hash | sha1( data ) |
md5
Evaluates md5 hash of an incoming string.
Syntax
local hash = security.md5( inputString )
Params
fields | type | description |
---|---|---|
data | string | Target data for calculating md5 checksum |
Returns
fields | type | description |
---|---|---|
hash | string | md5 checksum |
Examples
local security = require("security")
local hash = security.md5("This is a string")
sha1
Evaluates sha1 hash of an incoming string.
Syntax
local hash = security.sha1( inputString )
Params
fields | type | description |
---|---|---|
data | string | Target data for calculating md5 checksum |
Returns
fields | type | description |
---|---|---|
hash | string | sha1 checksum |
Examples
local security = require("security")
local hash = security.sha1("This is a string")