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

Go to the source code of this file.

Functions

VOID SYMCRYPT_CALL SymCryptSp800_108_HmacSha384SelfTest (void)
 
VOID SYMCRYPT_CALL SymCryptSp800_108_HmacSha512SelfTest (void)
 

Variables

static const BYTE sp800_108_sha384Answer []
 
static const BYTE sp800_108_sha512Answer []
 

Function Documentation

◆ SymCryptSp800_108_HmacSha384SelfTest()

VOID SYMCRYPT_CALL SymCryptSp800_108_HmacSha384SelfTest ( void  )

Definition at line 21 of file sp800_108_hmacsha512.c.

22{
24
27 &SymCryptTestKey32[0], 8, // key
28 (PCBYTE)"Label", 5, // label
29 &SymCryptTestKey32[16], 16, // context
30 res,
31 sizeof(res));
32
33 SymCryptInjectError( res, sizeof( res ) );
34
35 if (memcmp(res, sp800_108_sha384Answer, sizeof(res)) !=0)
36 {
37 SymCryptFatal('8108');
38 }
39}
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
GLuint res
Definition: glext.h:9613
VOID SYMCRYPT_CALL SymCryptInjectError(PBYTE pbData, SIZE_T cbData)
const BYTE SymCryptTestKey32[32]
Definition: selftest.c:10
static const BYTE sp800_108_sha384Answer[]
SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptSp800_108(PCSYMCRYPT_MAC macAlgorithm, _In_reads_(cbKey) PCBYTE pbKey, SIZE_T cbKey, _In_reads_opt_(cbLabel) PCBYTE pbLabel, SIZE_T cbLabel, _In_reads_opt_(cbContext) PCBYTE pbContext, SIZE_T cbContext, _Out_writes_(cbResult) PBYTE pbResult, SIZE_T cbResult)
Definition: sp800_108.c:104
_Analysis_noreturn_ VOID SYMCRYPT_CALL SymCryptFatal(UINT32 fatalCode)
const PCSYMCRYPT_MAC SymCryptHmacSha384Algorithm
Definition: hmacsha384.c:31
const BYTE * PCBYTE
unsigned char BYTE
Definition: xxhash.c:193

◆ SymCryptSp800_108_HmacSha512SelfTest()

VOID SYMCRYPT_CALL SymCryptSp800_108_HmacSha512SelfTest ( void  )

Definition at line 48 of file sp800_108_hmacsha512.c.

49{
51
54 &SymCryptTestKey32[0], 8, // key
55 (PCBYTE)"Label", 5, // label
56 &SymCryptTestKey32[16], 16, // context
57 res,
58 sizeof(res));
59
60 SymCryptInjectError( res, sizeof( res ) );
61
62 if (memcmp(res, sp800_108_sha512Answer, sizeof(res)) !=0)
63 {
64 SymCryptFatal('8108');
65 }
66}
static const BYTE sp800_108_sha512Answer[]
const PCSYMCRYPT_MAC SymCryptHmacSha512Algorithm
Definition: hmacsha512.c:29

Variable Documentation

◆ sp800_108_sha384Answer

const BYTE sp800_108_sha384Answer[]
static
Initial value:
=
{
0xc7, 0x10, 0x27, 0x87, 0xd8, 0x96, 0xbc, 0x89,
}

Definition at line 14 of file sp800_108_hmacsha512.c.

Referenced by SymCryptSp800_108_HmacSha384SelfTest().

◆ sp800_108_sha512Answer

const BYTE sp800_108_sha512Answer[]
static
Initial value:
=
{
0xdb, 0x3a, 0x18, 0xd9, 0x6c, 0x4a, 0xd4, 0x1e,
}

Definition at line 41 of file sp800_108_hmacsha512.c.

Referenced by SymCryptSp800_108_HmacSha512SelfTest().