TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ltc_hash_descriptor Struct Reference

#include <tomcrypt_hash.h>

Public Attributes

char * name
 
unsigned char ID
 
unsigned long hashsize
 
unsigned long blocksize
 
unsigned long OID [16]
 
unsigned long OIDlen
 
int(* init )(hash_state *hash)
 
int(* process )(hash_state *hash, const unsigned char *in, unsigned long inlen)
 
int(* done )(hash_state *hash, unsigned char *out)
 
int(* test )(void)
 
int(* hmac_block )(const unsigned char *key, unsigned long keylen, const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen)
 

Detailed Description

hash descriptor

Member Data Documentation

unsigned long ltc_hash_descriptor::blocksize

Input block size in octets

int(* ltc_hash_descriptor::done)(hash_state *hash, unsigned char *out)

Produce the digest and store it

Parameters
hashThe hash state
out[out] The destination of the digest
Returns
CRYPT_OK if successful
unsigned long ltc_hash_descriptor::hashsize

Size of digest in octets

int(* ltc_hash_descriptor::hmac_block)(const unsigned char *key, unsigned long keylen, const unsigned char *in, unsigned long inlen, unsigned char *out, unsigned long *outlen)
unsigned char ltc_hash_descriptor::ID

internal ID

int(* ltc_hash_descriptor::init)(hash_state *hash)

Init a hash state

Parameters
hashThe hash to initialize
Returns
CRYPT_OK if successful
char* ltc_hash_descriptor::name

name of hash

unsigned long ltc_hash_descriptor::OID[16]

ASN.1 OID

unsigned long ltc_hash_descriptor::OIDlen

Length of DER encoding

int(* ltc_hash_descriptor::process)(hash_state *hash, const unsigned char *in, unsigned long inlen)

Process a block of data

Parameters
hashThe hash state
inThe data to hash
inlenThe length of the data (octets)
Returns
CRYPT_OK if successful
int(* ltc_hash_descriptor::test)(void)

Self-test

Returns
CRYPT_OK if successful, CRYPT_NOP if self-tests have been disabled

The documentation for this struct was generated from the following file: