My Project
Loading...
Searching...
No Matches
hash.h File Reference

Go to the source code of this file.

Data Structures

union  wc_HashAlg
 

Enumerations

enum  wc_HashFlags { WC_HASH_FLAG_NONE = 0x00000000 , WC_HASH_FLAG_WILLCOPY = 0x00000001 , WC_HASH_FLAG_ISCOPY = 0x00000002 , WC_HASH_SHA3_KECCAK256 =0x00010000 }
 
enum  max_prf {
  MAX_PRF_HALF = 516 , MAX_PRF_HALF = 516 , MAX_PRF_HALF = 516 , MAX_PRF_LABSEED = 128 ,
  MAX_PRF_DIG = 224
}
 

Functions

WOLFSSL_API int wc_HashGetOID (enum wc_HashType hash_type)
 This function will return the OID for the wc_HashType provided.
 
WOLFSSL_API enum wc_HashType wc_OidGetHash (int oid)
 
WOLFSSL_API enum wc_HashType wc_HashTypeConvert (int hashType)
 
WOLFSSL_API int wc_HashGetDigestSize (enum wc_HashType hash_type)
 This function returns the size of the digest (output) for a hash_type. The returns size is used to make sure the output buffer provided to wc_Hash is large enough.
 
WOLFSSL_API int wc_HashGetBlockSize (enum wc_HashType hash_type)
 
WOLFSSL_API int wc_Hash (enum wc_HashType hash_type, const byte *data, word32 data_len, byte *hash, word32 hash_len)
 This function performs a hash on the provided data buffer and returns it in the hash buffer provided.
 
WOLFSSL_API int wc_HashInit_ex (wc_HashAlg *hash, enum wc_HashType type, void *heap, int devId)
 
WOLFSSL_API int wc_HashInit (wc_HashAlg *hash, enum wc_HashType type)
 
WOLFSSL_API int wc_HashUpdate (wc_HashAlg *hash, enum wc_HashType type, const byte *data, word32 dataSz)
 
WOLFSSL_API int wc_HashFinal (wc_HashAlg *hash, enum wc_HashType type, byte *out)
 
WOLFSSL_API int wc_HashFree (wc_HashAlg *hash, enum wc_HashType type)
 
WOLFSSL_API int wc_HashSetFlags (wc_HashAlg *hash, enum wc_HashType type, word32 flags)
 
WOLFSSL_API int wc_HashGetFlags (wc_HashAlg *hash, enum wc_HashType type, word32 *flags)
 
WOLFSSL_API int wc_Md5Hash (const byte *data, word32 len, byte *hash)
 Convenience function, handles all the hashing and places the result into hash.
 
WOLFSSL_API int wc_ShaHash (const byte *, word32, byte *)
 Convenience function, handles all the hashing and places the result into hash.
 
WOLFSSL_API int wc_Sha224Hash (const byte *, word32, byte *)
 Convenience function, handles all the hashing and places the result into hash.
 
WOLFSSL_API int wc_Sha256Hash (const byte *, word32, byte *)
 Convenience function, handles all the hashing and places the result into hash.
 
WOLFSSL_API int wc_Sha384Hash (const byte *, word32, byte *)
 Convenience function, handles all the hashing and places the result into hash.
 
WOLFSSL_API int wc_Sha512Hash (const byte *, word32, byte *)
 Convenience function, handles all the hashing and places the result into hash.
 
WOLFSSL_API int wc_Sha3_224Hash (const byte *, word32, byte *)
 
WOLFSSL_API int wc_Sha3_256Hash (const byte *, word32, byte *)
 
WOLFSSL_API int wc_Sha3_384Hash (const byte *, word32, byte *)
 
WOLFSSL_API int wc_Sha3_512Hash (const byte *, word32, byte *)
 
WOLFSSL_API int wc_Shake256Hash (const byte *, word32, byte *, word32)
 
WOLFSSL_API int wc_PRF (byte *result, word32 resLen, const byte *secret, word32 secLen, const byte *seed, word32 seedLen, int hash, void *heap, int devId)
 
WOLFSSL_API int wc_PRF_TLSv1 (byte *digest, word32 digLen, const byte *secret, word32 secLen, const byte *label, word32 labLen, const byte *seed, word32 seedLen, void *heap, int devId)
 
WOLFSSL_API int wc_PRF_TLS (byte *digest, word32 digLen, const byte *secret, word32 secLen, const byte *label, word32 labLen, const byte *seed, word32 seedLen, int useAtLeastSha256, int hash_type, void *heap, int devId)
 

Variables

 C
 

Variable Documentation

◆ C

C
extern
Initial value:
{
#endif
#if !defined(HAVE_FIPS) && !defined(NO_OLD_WC_NAMES)
#endif
enum wc_MACAlgorithm {
no_mac,
md5_mac,
sha_mac,
sha224_mac,
sha256_mac,
sha384_mac,
sha512_mac,
rmd_mac,
blake2b_mac
}