crypto::blake2b+x86_64 +linux

This module implements the blake2b password hashing algorithm, bug-for-bug compatible with the classic OpenBSD implementation. It is not recommended except in cases of backwards-compatibility with legacy systems.

This is a low-level module which implements cryptographic primitives. Direct use of cryptographic primitives is not recommended for non-experts, as incorrect use of these primitives can easily lead to the introduction of security vulnerabilities. Non-experts are advised to use the high-level operations available in the top-level crypto:: module.

Be advised that Hare's cryptography implementations have not been audited.

Index

Types

// Undocumented types:
type digest = struct {
	hash::hash,
	h: [8]u64,
	tlow: u64,
	thigh: u64,
	block: [BSZ]u8,
	blocklen: size,
};

Functions

fn blake2b(key: []u8, sz: size) digest;

Types

type digest[link]

Show undocumented member
type digest = struct {
	hash::hash,
	h: [8]u64,
	tlow: u64,
	thigh: u64,
	block: [BSZ]u8,
	blocklen: size,
};

Functions

fn blake2b[link]

fn blake2b(key: []u8, sz: size) digest;

Creates a hash::hash which computes a BLAKE2b hash with a given key and a given hash size. The size must be between 1 and 64, inclusive. If this function is used to hash sensitive information, the caller should call hash::close to erase sensitive data from memory after use; if not, the use of hash::close is optional. This function does not provide reset functionality and calling hash::reset on it will terminate execution.