FreeRDP
libwinpr/crypto/hash.c File Reference
#include <winpr/crt.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_CTXwinpr_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_CTXwinpr_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 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 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  )

Generic Digest API

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 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 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 caller graph for this function:

◆ winpr_HMAC_New()

WINPR_HMAC_CTX* winpr_HMAC_New ( void  )
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 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)

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 },
WINPR_MD_MD2
@ WINPR_MD_MD2
Definition: winpr/include/winpr/crypto.h:650
WINPR_MD_SHA1
@ WINPR_MD_SHA1
Definition: winpr/include/winpr/crypto.h:653
WINPR_MD_SHA3_512
@ WINPR_MD_SHA3_512
Definition: winpr/include/winpr/crypto.h:662
WINPR_MD_SHAKE128
@ WINPR_MD_SHAKE128
Definition: winpr/include/winpr/crypto.h:663
WINPR_MD_SHA224
@ WINPR_MD_SHA224
Definition: winpr/include/winpr/crypto.h:654
WINPR_MD_SHAKE256
@ WINPR_MD_SHAKE256
Definition: winpr/include/winpr/crypto.h:664
WINPR_MD_SHA384
@ WINPR_MD_SHA384
Definition: winpr/include/winpr/crypto.h:656
WINPR_MD_NONE
@ WINPR_MD_NONE
Definition: winpr/include/winpr/crypto.h:649
WINPR_MD_MD4
@ WINPR_MD_MD4
Definition: winpr/include/winpr/crypto.h:651
WINPR_MD_SHA512
@ WINPR_MD_SHA512
Definition: winpr/include/winpr/crypto.h:657
WINPR_MD_SHA3_224
@ WINPR_MD_SHA3_224
Definition: winpr/include/winpr/crypto.h:659
WINPR_MD_SHA3_256
@ WINPR_MD_SHA3_256
Definition: winpr/include/winpr/crypto.h:660
WINPR_MD_SHA3_384
@ WINPR_MD_SHA3_384
Definition: winpr/include/winpr/crypto.h:661
WINPR_MD_SHA256
@ WINPR_MD_SHA256
Definition: winpr/include/winpr/crypto.h:655
NULL
if availableBytes return NULL
Definition: TPCircularBuffer.h:109
WINPR_MD_MD5
@ WINPR_MD_MD5
Definition: winpr/include/winpr/crypto.h:652