Add Windows CNG (BCrypt) support to HCrypto EVP API

This commit is contained in:
Luke Howard
2015-02-06 16:26:08 +11:00
parent 49861eb2c5
commit 5023f55208
28 changed files with 1517 additions and 113 deletions

View File

@@ -43,7 +43,7 @@
#define E m->counter[4]
#define X data
void
int
SHA1_Init (struct sha *m)
{
m->sz[0] = 0;
@@ -53,6 +53,7 @@ SHA1_Init (struct sha *m)
C = 0x98badcfe;
D = 0x10325476;
E = 0xc3d2e1f0;
return 1;
}
@@ -220,7 +221,7 @@ struct x32{
unsigned int b:32;
};
void
int
SHA1_Update (struct sha *m, const void *v, size_t len)
{
const unsigned char *p = v;
@@ -253,9 +254,10 @@ SHA1_Update (struct sha *m, const void *v, size_t len)
offset = 0;
}
}
return 1;
}
void
int
SHA1_Final (void *res, struct sha *m)
{
unsigned char zeros[72];
@@ -293,4 +295,5 @@ SHA1_Final (void *res, struct sha *m)
r[i] = swap_uint32_t (m->counter[i]);
}
#endif
return 1;
}