mirror of
https://github.com/sheumann/65816-crypto.git
synced 2024-11-22 07:31:58 +00:00
31 lines
792 B
C
31 lines
792 B
C
#include "sha1.h"
|
|
#include <stdio.h>
|
|
|
|
int main(void) {
|
|
struct sha1_context context = {{0}, 0,0,0,0,0, {0}, 0,0,0,0,0,
|
|
{0x61,0x62,0x63,0x80,
|
|
0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x00,
|
|
0x00,0x00,0x00,0x18
|
|
},
|
|
{0}};
|
|
|
|
sha1_init(&context);
|
|
sha1_processchunk(&context);
|
|
|
|
printf("abcde = %08lx %08lx %08lx %08lx %08lx\n", context.a, context.b, context.c, context.d, context.e);
|
|
printf("h[..] = %08lx %08lx %08lx %08lx %08lx\n", context.h0, context.h1, context.h2, context.h3, context.h4);
|
|
}
|