/*1* Cryptographic API.2*3* s390 generic implementation of the SHA Secure Hash Algorithms.4*5* Copyright IBM Corp. 20076* Author(s): Jan Glauber ([email protected])7*8* This program is free software; you can redistribute it and/or modify it9* under the terms of the GNU General Public License as published by the Free10* Software Foundation; either version 2 of the License, or (at your option)11* any later version.12*13*/14#ifndef _CRYPTO_ARCH_S390_SHA_H15#define _CRYPTO_ARCH_S390_SHA_H1617#include <linux/crypto.h>18#include <crypto/sha.h>1920/* must be big enough for the largest SHA variant */21#define SHA_MAX_STATE_SIZE 1622#define SHA_MAX_BLOCK_SIZE SHA512_BLOCK_SIZE2324struct s390_sha_ctx {25u64 count; /* message length in bytes */26u32 state[SHA_MAX_STATE_SIZE];27u8 buf[2 * SHA_MAX_BLOCK_SIZE];28int func; /* KIMD function to use */29};3031struct shash_desc;3233int s390_sha_update(struct shash_desc *desc, const u8 *data, unsigned int len);34int s390_sha_final(struct shash_desc *desc, u8 *out);3536#endif373839