Module HASH

Cryptographic hash functions

An hash is also known as 'message digest', 'digital fingerprint', 'digest' or 'checksum'.

HASH objects can be generated from a number of implemented algorithms: sha256 and sha512.

objects are instantiated using HASH:new and then provide the method HASH:process that takes an input OCTET and then returns another fixed-size octet that is uniquely matched to the original data. The process is not reversible (the original data cannot be retrieved from an hash).

Info:

  • Copyright: Dyne.org foundation 2017-2018
  • License: GPLv3
  • Author: Denis "Jaromil" Roio

Functions

new (string) Create a new hash object of a selected algorithm (sha256 or sha512).
hash:process (data) Hash an octet into a new octet.


Functions

new (string)
Create a new hash object of a selected algorithm (sha256 or sha512). The resulting object can then process any OCTET into its hashed equivalent. (string)

Parameters:

  • string indicating the type of hash algorithm

Returns:

    a new hash object ready to process data.

See also:

hash:process (data)
Hash an octet into a new octet. Use the configured hash function to hash an octet string and return a new one containing its hash. (data)

Parameters:

  • data octet containing the data to be hashed

Returns:

    a new octet containing the hash of the data
generated by LDoc 1.4.3 Last updated 2018-10-01 18:53:47
]==]