SYNOPSIS
DESCRIPTION
The Core4 system includes a copy of mbed TLS.
This function creates a new object for calculating one-way hashes (message digests).
The optional parameter alg names the desired message digest algorithm.
When the parameter alg is not given, the object is created uninitialized. Before it can be used, the initialization function hash:init() must be called.
Supported algorithms are: MD2, MD4, MD5, SHA1, SHA224, SHA256, SHA384, SHA512, RIPEMD160.
After initialization, data is fed to the algorithme by calling hash:update().
The result can be retrieved by calling hash:finish().
RETURN VALUE
On success, returns a hash calculation instance.
If initialization failed, returns nil, a string describing the error and the mbedtls error code number.
EXAMPLE
Calculate a SHA256 checksum