ReactOS 0.4.17-dev-1005-g171e1de
hmacmd5.c File Reference
#include "precomp.h"
#include "hmac_pattern.c"
Include dependency graph for hmacmd5.c:

Go to the source code of this file.

Macros

#define ALG   MD5
 
#define Alg   Md5
 
#define SET_DATALENGTH(state, len)   {state.dataLengthL = len;}
 

Functions

VOID SYMCRYPT_CALL SymCryptHmacMd5Selftest (void)
 

Variables

const SYMCRYPT_MAC SymCryptHmacMd5Algorithm_default
 
const PCSYMCRYPT_MAC SymCryptHmacMd5Algorithm = &SymCryptHmacMd5Algorithm_default
 
static const BYTE hmacMd5Kat [16]
 

Macro Definition Documentation

◆ ALG

#define ALG   MD5

Definition at line 9 of file hmacmd5.c.

◆ Alg

#define Alg   Md5

Definition at line 10 of file hmacmd5.c.

◆ SET_DATALENGTH

#define SET_DATALENGTH (   state,
  len 
)    {state.dataLengthL = len;}

Definition at line 11 of file hmacmd5.c.

Function Documentation

◆ SymCryptHmacMd5Selftest()

VOID SYMCRYPT_CALL SymCryptHmacMd5Selftest ( void  )

Definition at line 37 of file hmacmd5.c.

38{
41
44
45 SymCryptInjectError( res, sizeof( res ) );
46
47 if( memcmp( res, hmacMd5Kat, sizeof( res ) ) != 0 )
48 {
49 SymCryptFatal( 'hmd5');
50 }
51
52 //
53 // Normally we would wipe the expanded key structure here,
54 // but as this is a selftest with known data this is not needed.
55 //
56}
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
GLuint res
Definition: glext.h:9613
static const BYTE hmacMd5Kat[16]
Definition: hmacmd5.c:31
VOID SYMCRYPT_CALL SymCryptInjectError(PBYTE pbData, SIZE_T cbData)
const BYTE SymCryptTestKey32[32]
Definition: selftest.c:10
const BYTE SymCryptTestMsg3[3]
Definition: selftest.c:8
#define SYMCRYPT_HMAC_MD5_RESULT_SIZE
Definition: symcrypt.h:2660
_Analysis_noreturn_ VOID SYMCRYPT_CALL SymCryptFatal(UINT32 fatalCode)
SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptHmacMd5ExpandKey(_Out_ PSYMCRYPT_HMAC_MD5_EXPANDED_KEY pExpandedKey, _In_reads_opt_(cbKey) PCBYTE pbKey, SIZE_T cbKey)
VOID SYMCRYPT_CALL SymCryptHmacMd5(_In_ PCSYMCRYPT_HMAC_MD5_EXPANDED_KEY pExpandedKey, _In_reads_(cbData) PCBYTE pbData, SIZE_T cbData, _Out_writes_(SYMCRYPT_HMAC_MD5_RESULT_SIZE) PBYTE pbResult)
SYMCRYPT_MAGIC_FIELD SYMCRYPT_HMAC_MD5_EXPANDED_KEY
unsigned char BYTE
Definition: xxhash.c:193

Variable Documentation

◆ hmacMd5Kat

const BYTE hmacMd5Kat[16]
static
Initial value:
= {
0x77, 0x33, 0x69, 0x79, 0x9e, 0x54, 0xeb, 0x49, 0xff, 0x21, 0xe6, 0xf9, 0x63, 0xe5, 0xbb, 0x49,
}

Definition at line 31 of file hmacmd5.c.

Referenced by SymCryptHmacMd5Selftest().

◆ SymCryptHmacMd5Algorithm

Definition at line 29 of file hmacmd5.c.

Referenced by SymCryptTlsPrf1_1Derive().

◆ SymCryptHmacMd5Algorithm_default

const SYMCRYPT_MAC SymCryptHmacMd5Algorithm_default
Initial value:
= {
0,
}
VOID SYMCRYPT_CALL SymCryptHmacMd5Init(_Out_ PSYMCRYPT_HMAC_MD5_STATE pState, _In_ PCSYMCRYPT_HMAC_MD5_EXPANDED_KEY pExpandedKey)
const PCSYMCRYPT_HASH SymCryptMd5Algorithm
Definition: md5.c:43
VOID SYMCRYPT_CALL SymCryptHmacMd5Append(_Inout_ PSYMCRYPT_HMAC_MD5_STATE pState, _In_reads_(cbData) PCBYTE pbData, SIZE_T cbData)
VOID SYMCRYPT_CALL SymCryptHmacMd5Result(_Inout_ PSYMCRYPT_HMAC_MD5_STATE pState, _Out_writes_(SYMCRYPT_HMAC_MD5_RESULT_SIZE) PBYTE pbResult)
SYMCRYPT_MAGIC_FIELD SYMCRYPT_HMAC_MD5_STATE

Definition at line 17 of file hmacmd5.c.