crypto::sha512
The sha512 module implements the SHA-384, SHA-512, SHA-512/224, and SHA-512/256
hash algorithms as defined in FIPS 180-4.
Index
Types
type digest;
type variant;
Constants
const SIZE: size;
const SIZE224: size;
const SIZE256: size;
const SIZE384: size;
Functions
fn sha384() digest;
fn sha512() digest;
fn sha512_224() digest;
fn sha512_256() digest;
Types
type digest
Show undocumented member
type digest = struct {
hash::hash,
h: [8]u64,
x: [chunk]u8,
nx: size,
ln: size,
var: variant,
};
type variant
Show undocumented member
type variant = enum {
SHA384,
SHA512,
SHA512_224,
SHA512_256,
};
Constants
def SIZE
def SIZE: size;
The size, in bytes, of a SHA-512 checksum.
def SIZE224
def SIZE224: size;
The size, in bytes, of a SHA-512/224 checksum.
def SIZE256
def SIZE256: size;
The size, in bytes, of a SHA-512/256 checksum.
def SIZE384
def SIZE384: size;
The size, in bytes, of a SHA-384 checksum.
Functions
fn sha384
fn sha384() digest;
Creates a hash::hash which computes a SHA-384 hash. 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.
fn sha512
fn sha512() digest;
Creates a hash::hash which computes a SHA-512 hash. 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.
fn sha512_224
fn sha512_224() digest;
Creates a hash::hash which computes a SHA-512/224 hash. 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.
fn sha512_256
fn sha512_256() digest;
Creates a hash::hash which computes a SHA-512/256 hash. 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.