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

Go to the source code of this file.

Functions

VOID SYMCRYPT_CALL SymCryptPbkdf2_HmacSha1SelfTest (void)
 

Variables

static const UINT64 pbkdf2_IterationCnt = 5
 
static const BYTE pbkdf2_sha1Answer []
 

Function Documentation

◆ SymCryptPbkdf2_HmacSha1SelfTest()

VOID SYMCRYPT_CALL SymCryptPbkdf2_HmacSha1SelfTest ( void  )

Definition at line 23 of file pbkdf2_hmacsha1.c.

24{
25 BYTE res[sizeof(pbkdf2_sha1Answer)];
26
29 &SymCryptTestKey32[0], 8,
30 &SymCryptTestKey32[16], 16,
32 res,
33 sizeof(res));
34
35 SymCryptInjectError( res, sizeof( res ) );
36
37 if (memcmp(res, pbkdf2_sha1Answer, sizeof(res)) !=0)
38 {
39 SymCryptFatal('Pbk2');
40 }
41}
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
GLuint res
Definition: glext.h:9613
static const BYTE pbkdf2_sha1Answer[]
static const UINT64 pbkdf2_IterationCnt
VOID SYMCRYPT_CALL SymCryptInjectError(PBYTE pbData, SIZE_T cbData)
const BYTE SymCryptTestKey32[32]
Definition: selftest.c:10
const PCSYMCRYPT_MAC SymCryptHmacSha1Algorithm
Definition: hmacsha1.c:36
_Analysis_noreturn_ VOID SYMCRYPT_CALL SymCryptFatal(UINT32 fatalCode)
SYMCRYPT_ERROR SYMCRYPT_CALL SymCryptPbkdf2(PCSYMCRYPT_MAC macAlgorithm, _In_reads_(cbKey) PCBYTE pbKey, SIZE_T cbKey, _In_reads_opt_(cbSalt) PCBYTE pbSalt, SIZE_T cbSalt, UINT64 iterationCnt, _Out_writes_(cbResult) PBYTE pbResult, SIZE_T cbResult)
Definition: pbkdf2.c:89
unsigned char BYTE
Definition: xxhash.c:193

Variable Documentation

◆ pbkdf2_IterationCnt

const UINT64 pbkdf2_IterationCnt = 5
static

Definition at line 14 of file pbkdf2_hmacsha1.c.

Referenced by SymCryptPbkdf2_HmacSha1SelfTest().

◆ pbkdf2_sha1Answer

const BYTE pbkdf2_sha1Answer[]
static
Initial value:
=
{
0xef, 0xa9, 0xbf, 0xea, 0xa3, 0x4d, 0x70, 0x64,
}

Definition at line 16 of file pbkdf2_hmacsha1.c.

Referenced by SymCryptPbkdf2_HmacSha1SelfTest().