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

Go to the source code of this file.

Macros

#define SymCryptSha384AppendBlocks   SymCryptSha512AppendBlocks
 
#define ALG   SHA384
 
#define Alg   Sha384
 
#define SET_DATALENGTH(state, len)   {state.dataLengthL = len; state.dataLengthH = 0;}
 

Functions

VOID SYMCRYPT_CALL SymCryptHmacSha384Selftest (void)
 

Variables

const SYMCRYPT_MAC SymCryptHmacSha384Algorithm_default
 
const PCSYMCRYPT_MAC SymCryptHmacSha384Algorithm = &SymCryptHmacSha384Algorithm_default
 
static const BYTE hmacSha384Kat [48]
 

Macro Definition Documentation

◆ ALG

#define ALG   SHA384

Definition at line 11 of file hmacsha384.c.

◆ Alg

#define Alg   Sha384

Definition at line 12 of file hmacsha384.c.

◆ SET_DATALENGTH

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

Definition at line 13 of file hmacsha384.c.

◆ SymCryptSha384AppendBlocks

#define SymCryptSha384AppendBlocks   SymCryptSha512AppendBlocks

Definition at line 9 of file hmacsha384.c.

Function Documentation

◆ SymCryptHmacSha384Selftest()

VOID SYMCRYPT_CALL SymCryptHmacSha384Selftest ( void  )

Definition at line 41 of file hmacsha384.c.

42{
45
48
49 SymCryptInjectError( res, sizeof( res ) );
50 if( memcmp( res, hmacSha384Kat, sizeof( res ) ) != 0 )
51 {
52 SymCryptFatal( 'hsh3' );
53 }
54
55 //
56 // Normally we would wipe the expanded key structure here,
57 // but as this is a selftest with known data this is not needed.
58 //
59}
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
GLuint res
Definition: glext.h:9613
static const BYTE hmacSha384Kat[48]
Definition: hmacsha384.c:33
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
SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptHmacSha384ExpandKey(_Out_ PSYMCRYPT_HMAC_SHA384_EXPANDED_KEY pExpandedKey, _In_reads_opt_(cbKey) PCBYTE pbKey, SIZE_T cbKey)
_Analysis_noreturn_ VOID SYMCRYPT_CALL SymCryptFatal(UINT32 fatalCode)
VOID SYMCRYPT_CALL SymCryptHmacSha384(_In_ PCSYMCRYPT_HMAC_SHA384_EXPANDED_KEY pExpandedKey, _In_reads_(cbData) PCBYTE pbData, SIZE_T cbData, _Out_writes_(SYMCRYPT_HMAC_SHA384_RESULT_SIZE) PBYTE pbResult)
#define SYMCRYPT_HMAC_SHA384_RESULT_SIZE
Definition: symcrypt.h:2920
SYMCRYPT_MAGIC_FIELD SYMCRYPT_HMAC_SHA384_EXPANDED_KEY
unsigned char BYTE
Definition: xxhash.c:193

Variable Documentation

◆ hmacSha384Kat

const BYTE hmacSha384Kat[48]
static
Initial value:
= {
0x67, 0xdb, 0x9d, 0x4d, 0x66, 0xed, 0xf2, 0xe7, 0x2b, 0x88, 0xb8, 0x50, 0x55, 0x68, 0xa0, 0x00,
0xa9, 0x83, 0x2b, 0xa3, 0x5e, 0x4f, 0xde, 0xcf, 0xe5, 0x38, 0x9a, 0x5d, 0x92, 0x79, 0x81, 0x53,
0x6d, 0xdb, 0x94, 0xc0, 0xf6, 0xc0, 0xbd, 0x94, 0xc4, 0x18, 0x96, 0x4b, 0xbe, 0x4b, 0x6c, 0xf2,
}

Definition at line 33 of file hmacsha384.c.

Referenced by SymCryptHmacSha384Selftest().

◆ SymCryptHmacSha384Algorithm

◆ SymCryptHmacSha384Algorithm_default

const SYMCRYPT_MAC SymCryptHmacSha384Algorithm_default
Initial value:
= {
}
VOID SYMCRYPT_CALL SymCryptHmacSha384Result(_Inout_ PSYMCRYPT_HMAC_SHA384_STATE pState, _Out_writes_(SYMCRYPT_HMAC_SHA384_RESULT_SIZE) PBYTE pbResult)
const PCSYMCRYPT_HASH SymCryptSha384Algorithm
Definition: sha512.c:169
VOID SYMCRYPT_CALL SymCryptHmacSha384Append(_Inout_ PSYMCRYPT_HMAC_SHA384_STATE pState, _In_reads_(cbData) PCBYTE pbData, SIZE_T cbData)
VOID SYMCRYPT_CALL SymCryptHmacSha384Init(_Out_ PSYMCRYPT_HMAC_SHA384_STATE pState, _In_ PCSYMCRYPT_HMAC_SHA384_EXPANDED_KEY pExpandedKey)
SYMCRYPT_MD5_CHAINING_STATE outerState
SYMCRYPT_MAGIC_FIELD SYMCRYPT_HMAC_SHA384_STATE
#define SYMCRYPT_FIELD_OFFSET(type, field)

Definition at line 19 of file hmacsha384.c.