SipHash24Streaming¶
Provides SipHash24 for non-array data
given as separate U64s.
Usage:¶
use "collections"
actor Main
new create(env: Env) =>
try
let sip = SipHash24Streaming.create()
for x in Range[U64](1, 100).values() do
// feed consecutive U64s to be hashed
sip.update(x)
end
// execute finishing steps, reset internal state so this instance can be
// reused, and output the computed hash
let hash = sip.finish()
env.out.print("HASHED: " + hash.string())
end
Constructors¶
create¶
Returns¶
- SipHash24Streaming ref^
Public Functions¶
reset¶
Reset the internal state.
Returns¶
- None val
update¶
Hash the given m and update the internal state accordingly.
Parameters¶
- m: U64 val
Returns¶
- None val
finish¶
This method finally computes the hash from all the data added with update,
and resets the internal state,
so this instance can be conveniently reused for another hash calculation.
Returns¶
- U64 val