Commit 35c0511d authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

advapi32: Remove tests for the sha context structure.

parent ca625836
......@@ -33,8 +33,6 @@ typedef struct {
UCHAR Buffer[64];
} SHA_CTX, *PSHA_CTX;
#define ctxcmp(a,b) memcmp((char*)a, (char*)b, FIELD_OFFSET(SHA_CTX, Buffer))
static void test_sha_ctx(void)
{
FARPROC pA_SHAInit, pA_SHAUpdate, pA_SHAFinal;
......@@ -45,9 +43,6 @@ static void test_sha_ctx(void)
ULONG test_buffer_size = strlen(test_buffer);
HMODULE hmod;
SHA_CTX ctx;
SHA_CTX ctx_initialized = {{0, 0, 0, 0, 0}, {0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0}, {0, 0}};
SHA_CTX ctx_update1 = {{0, 0, 0, 0, 0}, {0xdbe5eba8, 0x6b4335ca, 0xf7c94abe, 0xc9f34e31, 0x311023f0}, {0, 0x67}};
SHA_CTX ctx_update2 = {{0, 0, 0, 0, 0}, {0x5ecc818d, 0x52498169, 0xf6758559, 0xd035a164, 0x871dd125}, {0, 0xce}};
ULONG result[5];
ULONG result_correct[5] = {0xe014f93, 0xe09791ec, 0x6dcf96c8, 0x8e9385fc, 0x1611c1bb};
......@@ -64,16 +59,9 @@ static void test_sha_ctx(void)
RtlZeroMemory(&ctx, sizeof(ctx));
pA_SHAInit(&ctx);
ok(!ctxcmp(&ctx, &ctx_initialized), "invalid initialization\n");
pA_SHAUpdate(&ctx, test_buffer, test_buffer_size);
ok(!ctxcmp(&ctx, &ctx_update1), "update doesn't work correctly\n");
pA_SHAUpdate(&ctx, test_buffer, test_buffer_size);
ok(!ctxcmp(&ctx, &ctx_update2), "update doesn't work correctly\n");
pA_SHAFinal(&ctx, result);
ok(!ctxcmp(&ctx, &ctx_initialized), "context hasn't been reinitialized\n");
ok(!memcmp(result, result_correct, sizeof(result)), "incorrect result\n");
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment