Struct tomcrypt_sys::ltc_hash_descriptor
[−]
[src]
#[repr(C)]pub struct ltc_hash_descriptor { pub name: *const c_char, pub ID: c_uchar, pub hashsize: c_ulong, pub blocksize: c_ulong, pub OID: [c_ulong; 16], pub OIDlen: c_ulong, pub init: Option<unsafe extern "C" fn(_: *mut hash_state) -> c_int>, pub process: Option<unsafe extern "C" fn(_: *mut hash_state, _: *const c_uchar, _: c_ulong) -> c_int>, pub done: Option<unsafe extern "C" fn(_: *mut hash_state, _: *mut c_uchar) -> c_int>, pub test: Option<unsafe extern "C" fn() -> c_int>, pub hmac_block: Option<unsafe extern "C" fn(_: *const c_uchar, _: c_ulong, _: *const c_uchar, _: c_ulong, _: *mut c_uchar, _: *mut c_ulong) -> c_int>, }
hash descriptor
Fields
name: *const c_char
name of hash
ID: c_uchar
internal ID
hashsize: c_ulong
Size of digest in octets
blocksize: c_ulong
Input block size in octets
OID: [c_ulong; 16]
ASN.1 OID
OIDlen: c_ulong
Length of DER encoding
init: Option<unsafe extern "C" fn(_: *mut hash_state) -> c_int>
Init a hash state @param hash The hash to initialize @return CRYPT_OK if successful
process: Option<unsafe extern "C" fn(_: *mut hash_state, _: *const c_uchar, _: c_ulong) -> c_int>
Process a block of data @param hash The hash state @param in The data to hash @param inlen The length of the data (octets) @return CRYPT_OK if successful
done: Option<unsafe extern "C" fn(_: *mut hash_state, _: *mut c_uchar) -> c_int>
Produce the digest and store it @param hash The hash state @param out [out] The destination of the digest @return CRYPT_OK if successful
test: Option<unsafe extern "C" fn() -> c_int>
Self-test @return CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled
hmac_block: Option<unsafe extern "C" fn(_: *const c_uchar, _: c_ulong, _: *const c_uchar, _: c_ulong, _: *mut c_uchar, _: *mut c_ulong) -> c_int>