digest_by_name
- Evaluates hash of an incoming string using a digest method specified. To successfully calculate a value the digest name should be listed in an output of get_all_digest_names() function..
Edit
fields | type | required | description |
---|---|---|---|
digestName | string | + | A digest method to calculate. Should be one of available methods. |
data | string | + | Target data to calculate a digest from. |
Edit
fields | type | description |
---|---|---|
hash | string | A digest value calculated, hex representation in lower case format |
Edit
message | description |
---|---|
digest name is empty | The digest name should not be empty |
failed to evaluate ‘digest_by_name’ digest with name ‘ | The unsupported digest name is passed |
input data size is more than N bytes | Input size is too big |
Edit
local security = require("security")
local hash = security.digest_by_name("sha334", "This is a string")