aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/crypto.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h
index 48aa5959abbb..ef7642ed3e42 100644
--- a/include/linux/crypto.h
+++ b/include/linux/crypto.h
@@ -532,6 +532,7 @@ static inline struct crypto_ablkcipher *crypto_alloc_ablkcipher(
532 const char *alg_name, u32 type, u32 mask) 532 const char *alg_name, u32 type, u32 mask)
533{ 533{
534 type &= ~CRYPTO_ALG_TYPE_MASK; 534 type &= ~CRYPTO_ALG_TYPE_MASK;
535 mask &= ~CRYPTO_ALG_TYPE_MASK;
535 type |= CRYPTO_ALG_TYPE_BLKCIPHER; 536 type |= CRYPTO_ALG_TYPE_BLKCIPHER;
536 mask |= CRYPTO_ALG_TYPE_BLKCIPHER_MASK; 537 mask |= CRYPTO_ALG_TYPE_BLKCIPHER_MASK;
537 538
@@ -554,6 +555,7 @@ static inline int crypto_has_ablkcipher(const char *alg_name, u32 type,
554 u32 mask) 555 u32 mask)
555{ 556{
556 type &= ~CRYPTO_ALG_TYPE_MASK; 557 type &= ~CRYPTO_ALG_TYPE_MASK;
558 mask &= ~CRYPTO_ALG_TYPE_MASK;
557 type |= CRYPTO_ALG_TYPE_BLKCIPHER; 559 type |= CRYPTO_ALG_TYPE_BLKCIPHER;
558 mask |= CRYPTO_ALG_TYPE_BLKCIPHER_MASK; 560 mask |= CRYPTO_ALG_TYPE_BLKCIPHER_MASK;
559 561
@@ -1086,6 +1088,7 @@ static inline struct crypto_hash *crypto_alloc_hash(const char *alg_name,
1086 u32 type, u32 mask) 1088 u32 type, u32 mask)
1087{ 1089{
1088 type &= ~CRYPTO_ALG_TYPE_MASK; 1090 type &= ~CRYPTO_ALG_TYPE_MASK;
1091 mask &= ~CRYPTO_ALG_TYPE_MASK;
1089 type |= CRYPTO_ALG_TYPE_HASH; 1092 type |= CRYPTO_ALG_TYPE_HASH;
1090 mask |= CRYPTO_ALG_TYPE_HASH_MASK; 1093 mask |= CRYPTO_ALG_TYPE_HASH_MASK;
1091 1094
@@ -1105,6 +1108,7 @@ static inline void crypto_free_hash(struct crypto_hash *tfm)
1105static inline int crypto_has_hash(const char *alg_name, u32 type, u32 mask) 1108static inline int crypto_has_hash(const char *alg_name, u32 type, u32 mask)
1106{ 1109{
1107 type &= ~CRYPTO_ALG_TYPE_MASK; 1110 type &= ~CRYPTO_ALG_TYPE_MASK;
1111 mask &= ~CRYPTO_ALG_TYPE_MASK;
1108 type |= CRYPTO_ALG_TYPE_HASH; 1112 type |= CRYPTO_ALG_TYPE_HASH;
1109 mask |= CRYPTO_ALG_TYPE_HASH_MASK; 1113 mask |= CRYPTO_ALG_TYPE_HASH_MASK;
1110 1114