crypto::sha512 +linux +x86_64

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

// Undocumented 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[link]

Show undocumented member
type digest = struct {
	hash::hash,
	h: [8]u64,
	x: [chunk]u8,
	nx: size,
	ln: size,
	var: variant,
};

type variant[link]

Show undocumented member
type variant = enum {
	SHA384,
	SHA512,
	SHA512_224,
	SHA512_256,

};

Constants

def SIZE[link]

def SIZE: size;

The size, in bytes, of a SHA-512 checksum.

def SIZE224[link]

def SIZE224: size;

The size, in bytes, of a SHA-512/224 checksum.

def SIZE256[link]

def SIZE256: size;

The size, in bytes, of a SHA-512/256 checksum.

def SIZE384[link]

def SIZE384: size;

The size, in bytes, of a SHA-384 checksum.

Functions

fn sha384[link]

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[link]

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[link]

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[link]

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.