Type Function Library crypto.* Return value String Revision Release 2024.3703 Keywords crypto, hash, digest
Generates the message digest (the hash) of the input string.
crypto.digest( algorithm, data [, raw] )
Constant. A constant specifying the hashing algorithm (see Constants for crypto.*).
String. The input string.
Boolean. Indicates whether the output should be a direct binary equivalent of the message digest. If false
(default), the result is formatted as a hexadecimal string.
local crypto = require( "crypto" ) local hash = crypto.digest( crypto.md4, "test" ) print( hash ) --> db346d691d7acc4dc2625db19f9e3f52