On this page:
8.1 Class Sbox  Hash64
«Sbox  Hash64».hash
8.2 Convenience
make_  sbox_  hash

8 The sbox_hash library

This library provides a way to create high-quality hash functions based on substitution boxes (from cryptography).

You can use it to create as many different hash functions as you need.

These definitions are not part of the base DSSL2 language, and must be imported explicitly using: import sbox_hash

8.1 Class SboxHash64

SboxHash64 objects are wrappers around a substitution-box-based hash function. Constructing a new object creates a new hash function.

The SboxHash64 constructor takes no arguments.


«SboxHash64».hash(AnyC) -> nat?

This method is the hash function proper. It accepts any value and hashes it to a (possibly very large!) natural number.

8.2 Convenience


make_sbox_hash(): FunC[AnyC, nat?]

Creates a new standalone substitution-box-based hash function and returns it.