FreeRDP
libwinpr/crypto/hash.c File Reference
#include <winpr/config.h>
#include <winpr/crt.h>
#include <winpr/assert.h>
#include <winpr/crypto.h>

Functions

WINPR_MD_TYPE winpr_md_type_from_string (const char *name)
 
const char * winpr_md_type_to_string (WINPR_MD_TYPE md)
 
WINPR_HMAC_CTX * winpr_HMAC_New (void)
 
BOOL winpr_HMAC_Init (WINPR_HMAC_CTX *ctx, WINPR_MD_TYPE md, const BYTE *key, size_t keylen)
 
BOOL winpr_HMAC_Update (WINPR_HMAC_CTX *ctx, const BYTE *input, size_t ilen)
 
BOOL winpr_HMAC_Final (WINPR_HMAC_CTX *ctx, BYTE *output, size_t olen)
 
void winpr_HMAC_Free (WINPR_HMAC_CTX *ctx)
 
BOOL winpr_HMAC (WINPR_MD_TYPE md, const BYTE *key, size_t keylen, const BYTE *input, size_t ilen, BYTE *output, size_t olen)
 
WINPR_DIGEST_CTX * winpr_Digest_New (void)
 
BOOL winpr_Digest_Init_Allow_FIPS (WINPR_DIGEST_CTX *ctx, WINPR_MD_TYPE md)
 
BOOL winpr_Digest_Init (WINPR_DIGEST_CTX *ctx, WINPR_MD_TYPE md)
 
BOOL winpr_Digest_Update (WINPR_DIGEST_CTX *ctx, const BYTE *input, size_t ilen)
 
BOOL winpr_Digest_Final (WINPR_DIGEST_CTX *ctx, BYTE *output, size_t olen)
 
void winpr_Digest_Free (WINPR_DIGEST_CTX *ctx)
 
BOOL winpr_Digest_Allow_FIPS (WINPR_MD_TYPE md, const BYTE *input, size_t ilen, BYTE *output, size_t olen)
 
BOOL winpr_Digest (WINPR_MD_TYPE md, const BYTE *input, size_t ilen, BYTE *output, size_t olen)
 

Variables

static const struct hash_map hashes []
 

Function Documentation

◆ winpr_Digest()

BOOL winpr_Digest ( WINPR_MD_TYPE  md,
const BYTE input,
size_t  ilen,
BYTE output,
size_t  olen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_Digest_Allow_FIPS()

BOOL winpr_Digest_Allow_FIPS ( WINPR_MD_TYPE  md,
const BYTE input,
size_t  ilen,
BYTE output,
size_t  olen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_Digest_Final()

BOOL winpr_Digest_Final ( WINPR_DIGEST_CTX *  ctx,
BYTE output,
size_t  olen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_Digest_Free()

void winpr_Digest_Free ( WINPR_DIGEST_CTX *  ctx)
Here is the caller graph for this function:

◆ winpr_Digest_Init()

BOOL winpr_Digest_Init ( WINPR_DIGEST_CTX *  ctx,
WINPR_MD_TYPE  md 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_Digest_Init_Allow_FIPS()

BOOL winpr_Digest_Init_Allow_FIPS ( WINPR_DIGEST_CTX *  ctx,
WINPR_MD_TYPE  md 
)
Here is the caller graph for this function:

◆ winpr_Digest_New()

WINPR_DIGEST_CTX* winpr_Digest_New ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_Digest_Update()

BOOL winpr_Digest_Update ( WINPR_DIGEST_CTX *  ctx,
const BYTE input,
size_t  ilen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_HMAC()

BOOL winpr_HMAC ( WINPR_MD_TYPE  md,
const BYTE key,
size_t  keylen,
const BYTE input,
size_t  ilen,
BYTE output,
size_t  olen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_HMAC_Final()

BOOL winpr_HMAC_Final ( WINPR_HMAC_CTX *  ctx,
BYTE output,
size_t  olen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_HMAC_Free()

void winpr_HMAC_Free ( WINPR_HMAC_CTX *  ctx)
Here is the caller graph for this function:

◆ winpr_HMAC_Init()

BOOL winpr_HMAC_Init ( WINPR_HMAC_CTX *  ctx,
WINPR_MD_TYPE  md,
const BYTE key,
size_t  keylen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_HMAC_New()

WINPR_HMAC_CTX* winpr_HMAC_New ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_HMAC_Update()

BOOL winpr_HMAC_Update ( WINPR_HMAC_CTX *  ctx,
const BYTE input,
size_t  ilen 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_md_type_from_string()

WINPR_MD_TYPE winpr_md_type_from_string ( const char *  name)
Here is the call graph for this function:

◆ winpr_md_type_to_string()

const char* winpr_md_type_to_string ( WINPR_MD_TYPE  md)
Here is the caller graph for this function:

Variable Documentation

◆ hashes

const struct hash_map hashes[]
static
Initial value:
= { { "md2", WINPR_MD_MD2 },
{ "md4", WINPR_MD_MD4 },
{ "md5", WINPR_MD_MD5 },
{ "sha1", WINPR_MD_SHA1 },
{ "sha224", WINPR_MD_SHA224 },
{ "sha256", WINPR_MD_SHA256 },
{ "sha384", WINPR_MD_SHA384 },
{ "sha512", WINPR_MD_SHA512 },
{ "sha3_224", WINPR_MD_SHA3_224 },
{ "sha3_256", WINPR_MD_SHA3_256 },
{ "sha3_384", WINPR_MD_SHA3_384 },
{ "sha3_512", WINPR_MD_SHA3_512 },
{ "shake128", WINPR_MD_SHAKE128 },
{ "shake256", WINPR_MD_SHAKE256 },
if availableBytes return NULL
Definition: TPCircularBuffer.h:109
@ WINPR_MD_SHA512
Definition: custom-crypto.h:60
@ WINPR_MD_MD5
Definition: custom-crypto.h:55
@ WINPR_MD_SHAKE256
Definition: custom-crypto.h:67
@ WINPR_MD_NONE
Definition: custom-crypto.h:52
@ WINPR_MD_SHA384
Definition: custom-crypto.h:59
@ WINPR_MD_SHA256
Definition: custom-crypto.h:58
@ WINPR_MD_MD2
Definition: custom-crypto.h:53
@ WINPR_MD_MD4
Definition: custom-crypto.h:54
@ WINPR_MD_SHA3_384
Definition: custom-crypto.h:64
@ WINPR_MD_SHA1
Definition: custom-crypto.h:56
@ WINPR_MD_SHA3_256
Definition: custom-crypto.h:63
@ WINPR_MD_SHA224
Definition: custom-crypto.h:57
@ WINPR_MD_SHA3_224
Definition: custom-crypto.h:62
@ WINPR_MD_SHAKE128
Definition: custom-crypto.h:66
@ WINPR_MD_SHA3_512
Definition: custom-crypto.h:65