Module khash::salt[][src]

Salt for the digest Context (see module ctx)

Salt kinds

  • Hard-coded embedded 32 byte salt (default)
  • Fixed compile time or global static 32 byte salt
  • Fixed runtime 32 byte salt
  • Dynamically sized runtime salt
  • No salt

You can also generate a random salt at runtime with Salt::random() which uses getrandom’s RNG to create a fixed 32 bytes salt.

Method of salting

The salt is fed into the hashing function directly after the data.

FFI note

When generating a dynamic salt from an FFI context, there is a hard limit of 1024 bytes for safety reasons. This is more than enough data for a salt.

Enums

Salt

A salt to use for the kana-hash algorithm, or lack thereof.

Constants

SIZE

The static salt size. (32 bytes.)

Statics

EMBEDDED_SALT

The default embedded static salt.