Skip to content

Commit 8ffd1be

Browse files
bgilbertherbertx
authored andcommitted
crypto: hash - Remove cra_u.{digest,hash}
Remove unused digest_alg and hash_alg structs from crypto_alg union and kill their definitions. This also ensures that old-style digest/hash algorithms maintained out of tree will break at build time rather than oopsing at runtime. Signed-off-by: Benjamin Gilbert <bgilbert@cs.cmu.edu> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 085751b commit 8ffd1be

1 file changed

Lines changed: 0 additions & 27 deletions

File tree

‎include/linux/crypto.h‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -250,29 +250,6 @@ struct cipher_alg {
250250
void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src);
251251
};
252252

253-
struct digest_alg {
254-
unsigned int dia_digestsize;
255-
void (*dia_init)(struct crypto_tfm *tfm);
256-
void (*dia_update)(struct crypto_tfm *tfm, const u8 *data,
257-
unsigned int len);
258-
void (*dia_final)(struct crypto_tfm *tfm, u8 *out);
259-
int (*dia_setkey)(struct crypto_tfm *tfm, const u8 *key,
260-
unsigned int keylen);
261-
};
262-
263-
struct hash_alg {
264-
int (*init)(struct hash_desc *desc);
265-
int (*update)(struct hash_desc *desc, struct scatterlist *sg,
266-
unsigned int nbytes);
267-
int (*final)(struct hash_desc *desc, u8 *out);
268-
int (*digest)(struct hash_desc *desc, struct scatterlist *sg,
269-
unsigned int nbytes, u8 *out);
270-
int (*setkey)(struct crypto_hash *tfm, const u8 *key,
271-
unsigned int keylen);
272-
273-
unsigned int digestsize;
274-
};
275-
276253
struct compress_alg {
277254
int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src,
278255
unsigned int slen, u8 *dst, unsigned int *dlen);
@@ -293,8 +270,6 @@ struct rng_alg {
293270
#define cra_aead cra_u.aead
294271
#define cra_blkcipher cra_u.blkcipher
295272
#define cra_cipher cra_u.cipher
296-
#define cra_digest cra_u.digest
297-
#define cra_hash cra_u.hash
298273
#define cra_compress cra_u.compress
299274
#define cra_rng cra_u.rng
300275

@@ -320,8 +295,6 @@ struct crypto_alg {
320295
struct aead_alg aead;
321296
struct blkcipher_alg blkcipher;
322297
struct cipher_alg cipher;
323-
struct digest_alg digest;
324-
struct hash_alg hash;
325298
struct compress_alg compress;
326299
struct rng_alg rng;
327300
} cra_u;

0 commit comments

Comments
 (0)