diff options
author | Cy Schubert <cy@FreeBSD.org> | 2017-10-18 03:44:27 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2017-10-18 03:44:27 +0000 |
commit | 256810032c472505440606bd9c1c4f7dbf06b0a2 (patch) | |
tree | d019f4f1ae29b86cbd3e9e74f832689976a267cf /src/crypto/sha512_i.h | |
parent | b834757ea3bcd1bba3381ff7cab216458d8f7efb (diff) |
Notes
Diffstat (limited to 'src/crypto/sha512_i.h')
-rw-r--r-- | src/crypto/sha512_i.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/crypto/sha512_i.h b/src/crypto/sha512_i.h new file mode 100644 index 0000000000000..108958911ef14 --- /dev/null +++ b/src/crypto/sha512_i.h @@ -0,0 +1,25 @@ +/* + * SHA-512 internal definitions + * Copyright (c) 2015, Pali Rohár <pali.rohar@gmail.com> + * + * This software may be distributed under the terms of the BSD license. + * See README for more details. + */ + +#ifndef SHA512_I_H +#define SHA512_I_H + +#define SHA512_BLOCK_SIZE 128 + +struct sha512_state { + u64 length, state[8]; + u32 curlen; + u8 buf[SHA512_BLOCK_SIZE]; +}; + +void sha512_init(struct sha512_state *md); +int sha512_process(struct sha512_state *md, const unsigned char *in, + unsigned long inlen); +int sha512_done(struct sha512_state *md, unsigned char *out); + +#endif /* SHA512_I_H */ |