#ifndef _CRYPTO_SHA2_H
#define _CRYPTO_SHA2_H
#include <linux/types.h>
#define SHA224_DIGEST_SIZE …
#define SHA224_BLOCK_SIZE …
#define SHA256_DIGEST_SIZE …
#define SHA256_BLOCK_SIZE …
#define SHA384_DIGEST_SIZE …
#define SHA384_BLOCK_SIZE …
#define SHA512_DIGEST_SIZE …
#define SHA512_BLOCK_SIZE …
#define SHA224_H0 …
#define SHA224_H1 …
#define SHA224_H2 …
#define SHA224_H3 …
#define SHA224_H4 …
#define SHA224_H5 …
#define SHA224_H6 …
#define SHA224_H7 …
#define SHA256_H0 …
#define SHA256_H1 …
#define SHA256_H2 …
#define SHA256_H3 …
#define SHA256_H4 …
#define SHA256_H5 …
#define SHA256_H6 …
#define SHA256_H7 …
#define SHA384_H0 …
#define SHA384_H1 …
#define SHA384_H2 …
#define SHA384_H3 …
#define SHA384_H4 …
#define SHA384_H5 …
#define SHA384_H6 …
#define SHA384_H7 …
#define SHA512_H0 …
#define SHA512_H1 …
#define SHA512_H2 …
#define SHA512_H3 …
#define SHA512_H4 …
#define SHA512_H5 …
#define SHA512_H6 …
#define SHA512_H7 …
extern const u8 sha224_zero_message_hash[SHA224_DIGEST_SIZE];
extern const u8 sha256_zero_message_hash[SHA256_DIGEST_SIZE];
extern const u8 sha384_zero_message_hash[SHA384_DIGEST_SIZE];
extern const u8 sha512_zero_message_hash[SHA512_DIGEST_SIZE];
struct sha256_state { … };
struct sha512_state { … };
struct shash_desc;
extern int crypto_sha256_update(struct shash_desc *desc, const u8 *data,
unsigned int len);
extern int crypto_sha256_finup(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *hash);
extern int crypto_sha512_update(struct shash_desc *desc, const u8 *data,
unsigned int len);
extern int crypto_sha512_finup(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *hash);
static inline void sha256_init(struct sha256_state *sctx)
{ … }
void sha256_update(struct sha256_state *sctx, const u8 *data, unsigned int len);
void sha256_final(struct sha256_state *sctx, u8 *out);
void sha256(const u8 *data, unsigned int len, u8 *out);
static inline void sha224_init(struct sha256_state *sctx)
{ … }
void sha224_final(struct sha256_state *sctx, u8 *out);
#endif