Calculate an Authentication Hash

txt = auth.hash(txt, [format], [which])

Calculates a hash of txt.

Parameter Type Description
txt string The text to hash
format integer The hash output format
which string Which hash to use.
format value Description
0 raw binary
1 ASCII hex
2 ASCII hex with colons (default)
which value Description
'md5' MD 5 hash
'sha1' SHA 1 hash