Updates for padlock hashes in C7 nano. Requires a part of nettle to be included.
[gnutls:gnutls.git] / lib / accelerated / x86 / sha-padlock.h
1 #ifndef SHA_PADLOCK_H
2 # define SHA_PADLOCK_H
3
4 void padlock_sha1_oneshot(void *ctx, const void *inp, size_t len);
5 void padlock_sha256_oneshot(void *ctx, const void *inp, size_t len);
6
7 void padlock_sha1_blocks(unsigned int *ctx,const void *inp,size_t blocks);
8 void padlock_sha256_blocks(unsigned int *ctx,const void *inp,size_t blocks);
9 void padlock_sha512_blocks(unsigned int *ctx,const void *inp,size_t blocks);
10
11 int wrap_padlock_hash_fast(gnutls_digest_algorithm_t algo, 
12   const void* text, size_t text_size, 
13   void* digest);
14
15 void padlock_sha1_update(struct sha1_ctx *ctx,
16             unsigned length, const uint8_t *data);
17 void padlock_sha256_update(struct sha256_ctx *ctx,
18               unsigned length, const uint8_t *data);
19 void padlock_sha512_update(struct sha512_ctx *ctx,
20               unsigned length, const uint8_t *data);
21
22 extern const struct nettle_hash padlock_sha1;
23 extern const struct nettle_hash padlock_sha224;
24 extern const struct nettle_hash padlock_sha256;
25 extern const struct nettle_hash padlock_sha384;
26 extern const struct nettle_hash padlock_sha512;
27
28 #endif