Method Nettle.Hash()->hash()
- Method
hash
string(8bit)
hash(string(8bit)
data
)- Description
Works as a (faster) shortcut for
State()->update(data)->digest()
, where State is the hash state class corresponding to this Hash.- See also
- Method
hash
string(8bit)
hash(Stdio.File
|Stdio.Buffer
|String.Buffer
|System.Memory
source
,void
|int(0..)
|__deprecated__
(int(..-1)
)bytes
)- Description
Works as a (faster) shortcut for e.g.
State()->update(Stdio.read_file(file))->digest()
, where State is the hash state class corresponding to this Hash.- Parameter
bytes
The number of bytes of the file object
file
that should be hashed. Zero and negative numbers are ignored and the whole file is hashed. Support for negative numbers is deprecated.- See also