sha1_init.c (346B)
1 /* ISC license. */ 2 3 #include <skalibs/sha1.h> 4 5 void sha1_init (SHA1Schedule *ctx) 6 { 7 ctx->buf[0] = 0x67452301U ; 8 ctx->buf[1] = 0xefcdab89U ; 9 ctx->buf[2] = 0x98badcfeU ; 10 ctx->buf[3] = 0x10325476U ; 11 ctx->buf[4] = 0xc3d2e1f0U ; 12 ctx->bits[0] = ctx->bits[1] = 0 ; 13 for (unsigned int i = 0 ; i < 16 ; i++) ctx->in[i] = 0 ; 14 ctx->b = 0 ; 15 }