Class type Cryptokit.hash
A <I>hash</I> is a function that maps arbitrarily-long character sequences to small, fixed-size strings.
method add_substring : bytes -> int -> int -> unit
add_substring b pos len
addslen
characters from byte arrayb
, starting at character numberpos
, to the running hash computation.
method add_string : string -> unit
add_string str
adds all characters of stringstr
to the running hash computation.
method add_byte : int -> unit
add_byte b
adds the character having codeb
to the running hash computation.b
must be between0
and255
inclusive.
method result : string
Terminate the hash computation and return the hash value for the input data provided via the
add_*
methods. The hash value is a string of lengthhash_size
characters. After callingresult
, the hash can no longer accept additional data. Hence, do not call any of theadd_*
methods afterresult
.
method wipe : unit
Erase all internal buffers and data structures of this hash, overwriting them with zeroes. See
Cryptokit.transform.wipe
.