File crypto_lua.luadoc

Functions

crypto.bin2hex (data) Returns the hexadecimal representation of data.
crypto.hmac (data, key, ALGO) Returns the binary HMAC of data.
crypto.md5 (data) Returns the binary MD5 sum of data.


Functions

crypto.bin2hex (data)
Returns the hexadecimal representation of data.

Parameters

  • data:

Return value:

string.
crypto.hmac (data, key, ALGO)
Returns the binary HMAC of data.

Parameters

  • data:
  • key: string The MAC key.
  • ALGO: userdata one of (crypto dot) ALGO_ripemd160 ALGO_md_null ALGO_dss1 ALGO_sha1 ALGO_dss ALGO_md2 ALGO_sha ALGO_md5 ALGO_md4. Note that not all these algorithms are granted, so you should check they are not nil.

Return value:

string (binary).
crypto.md5 (data)
Returns the binary MD5 sum of data.

Parameters

  • data:

Return value:

string (binary).

Valid XHTML 1.0!