Module subotai::hash [] [src]

The SubotaiHash is the element around which the Subotai network organizes itself. It's 160 bits long, and it serves as an ID number to identify nodes, as a key to identify storage entries, and optionally as a stored value.

This module exposes utilities to create and inspect SubotaiHash structures. A useful method is sha1, which allows you to create a sha-1 hash from some data, which can then be used as a key for a storage entry.

Structs

IntoOnes

Consuming iterator through the indices of each '1' in a hash.

IntoZeroes

Consuming iterator through the indices of each '0' in a hash.

Ones

Iterator through the indices of each '1' in a hash.

SubotaiHash

Light wrapper over a little endian HASH_SIZE bit hash.

Zeroes

Iterator through the indices of each '0' in a hash.

Constants

HASH_SIZE
HASH_SIZE_BYTES