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

Go to the source code of this file.

Macros

#define SymCryptSha512_224AppendBlocks   SymCryptSha512AppendBlocks
 
#define ALG   SHA512_224
 
#define Alg   Sha512_224
 
#define SET_DATALENGTH(state, len)   {state.dataLengthL = len; state.dataLengthH = 0;}
 

Functions

VOID SYMCRYPT_CALL SymCryptHmacSha512_224Selftest (void)
 

Variables

const SYMCRYPT_MAC SymCryptHmacSha512_224Algorithm_default
 
const PCSYMCRYPT_MAC SymCryptHmacSha512_224Algorithm = &SymCryptHmacSha512_224Algorithm_default
 
static const BYTE hmacSha512_224Kat [28]
 

Macro Definition Documentation

◆ ALG

#define ALG   SHA512_224

Definition at line 11 of file hmacsha512_224.c.

◆ Alg

#define Alg   Sha512_224

Definition at line 12 of file hmacsha512_224.c.

◆ SET_DATALENGTH

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

Definition at line 13 of file hmacsha512_224.c.

◆ SymCryptSha512_224AppendBlocks

#define SymCryptSha512_224AppendBlocks   SymCryptSha512AppendBlocks

Definition at line 9 of file hmacsha512_224.c.

Function Documentation

◆ SymCryptHmacSha512_224Selftest()

VOID SYMCRYPT_CALL SymCryptHmacSha512_224Selftest ( void  )

Definition at line 43 of file hmacsha512_224.c.

44{
47
50
51 SymCryptInjectError( res, sizeof( res ) );
52
53 if( memcmp( res, hmacSha512_224Kat, sizeof( res ) ) != 0 )
54 {
55 SymCryptFatal( 'hsh4' );
56 }
57
58 //
59 // Normally we would wipe the expanded key structure here,
60 // but as this is a selftest with known data this is not needed.
61 //
62}
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
GLuint res
Definition: glext.h:9613
static const BYTE hmacSha512_224Kat[28]
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
_Analysis_noreturn_ VOID SYMCRYPT_CALL SymCryptFatal(UINT32 fatalCode)
SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptHmacSha512_224ExpandKey(_Out_ PSYMCRYPT_HMAC_SHA512_224_EXPANDED_KEY pExpandedKey, _In_reads_opt_(cbKey) PCBYTE pbKey, SIZE_T cbKey)
#define SYMCRYPT_HMAC_SHA512_224_RESULT_SIZE
Definition: symcrypt.h:3050
VOID SYMCRYPT_CALL SymCryptHmacSha512_224(_In_ PCSYMCRYPT_HMAC_SHA512_224_EXPANDED_KEY pExpandedKey, _In_reads_(cbData) PCBYTE pbData, SIZE_T cbData, _Out_writes_(SYMCRYPT_HMAC_SHA512_224_RESULT_SIZE) PBYTE pbResult)
SYMCRYPT_MAGIC_FIELD SYMCRYPT_HMAC_SHA512_224_EXPANDED_KEY
unsigned char BYTE
Definition: xxhash.c:193

Variable Documentation

◆ hmacSha512_224Kat

const BYTE hmacSha512_224Kat[28]
static
Initial value:
= {
0x62, 0xc9, 0x59, 0xc7, 0x5b, 0x3c, 0xb2, 0xaf,
0x95, 0xf5, 0x59, 0x73, 0x2c, 0x46, 0x1d, 0x72,
0x06, 0x9e, 0xf9, 0x52, 0x9a, 0x8d, 0x84, 0x1a,
0x73, 0x97, 0xa6, 0x9c
}

Definition at line 33 of file hmacsha512_224.c.

Referenced by SymCryptHmacSha512_224Selftest().

◆ SymCryptHmacSha512_224Algorithm

const PCSYMCRYPT_MAC SymCryptHmacSha512_224Algorithm = &SymCryptHmacSha512_224Algorithm_default

Definition at line 31 of file hmacsha512_224.c.

◆ SymCryptHmacSha512_224Algorithm_default

const SYMCRYPT_MAC SymCryptHmacSha512_224Algorithm_default
Initial value:
= {
}
VOID SYMCRYPT_CALL SymCryptHmacSha512_224Append(_Inout_ PSYMCRYPT_HMAC_SHA512_224_STATE pState, _In_reads_(cbData) PCBYTE pbData, SIZE_T cbData)
VOID SYMCRYPT_CALL SymCryptHmacSha512_224Init(_Out_ PSYMCRYPT_HMAC_SHA512_224_STATE pState, _In_ PCSYMCRYPT_HMAC_SHA512_224_EXPANDED_KEY pExpandedKey)
VOID SYMCRYPT_CALL SymCryptHmacSha512_224Result(_Inout_ PSYMCRYPT_HMAC_SHA512_224_STATE pState, _Out_writes_(SYMCRYPT_HMAC_SHA512_224_RESULT_SIZE) PBYTE pbResult)
const PCSYMCRYPT_HASH SymCryptSha512_224Algorithm
Definition: sha512.c:171
SYMCRYPT_MD5_CHAINING_STATE outerState
#define SYMCRYPT_FIELD_OFFSET(type, field)
SYMCRYPT_MAGIC_FIELD SYMCRYPT_HMAC_SHA512_224_STATE

Definition at line 19 of file hmacsha512_224.c.