| Extracted from Pike v7.8 release 866 at 2016-04-05.

[Top]
Nettle
Nettle.HashInfo

# Method Nettle.HashInfo()->hash()

Method hash

  `string hash(string data)`

Description

  Works as a (faster) shortcut for `HashState()->update(data)->digest()`, where HashState is the hash state class corresponding to this HashInfo.

See also

  HashState()->update() and HashState()->digest() .

Method hash

  `string hash(Stdio.File file, void|int bytes)`

Description

  Works as a (faster) shortcut for `HashState()->update(Stdio.read_file(file))->digest()`, where HashState is the hash state class corresponding to this HashInfo.

Parameter `bytes`

  The number of bytes of the file object file that should be hashed. Negative numbers are ignored and the whole file is hashed.

See also

  Stdio.File , HashState()->update() and HashState()->digest() .