diff options
| author | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-11-20 22:18:42 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-11-20 22:18:42 -0800 |
| commit | 682d5feaa0e6404b14de961b15e53b20c41e02db (patch) | |
| tree | 4785e204f6a37eaaedb65ba728cb438d0809b0d9 /include | |
| parent | b3cf3e5b3acc10ddc7a4ba27081eebac82260f87 (diff) | |
| parent | 9760e24965686b9c1b004b986e7c10c7f2260750 (diff) | |
Merge master.kernel.org:/home/davem/BK/net-2.5
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/crypto.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index b3448683d02d..960e54133e29 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h @@ -29,7 +29,7 @@ #define CRYPTO_ALG_TYPE_MASK 0x000000ff #define CRYPTO_ALG_TYPE_CIPHER 0x00000001 #define CRYPTO_ALG_TYPE_DIGEST 0x00000002 -#define CRYPTO_ALG_TYPE_COMP 0x00000004 +#define CRYPTO_ALG_TYPE_COMPRESS 0x00000004 /* @@ -209,16 +209,19 @@ static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm) static inline unsigned int crypto_tfm_alg_min_keysize(struct crypto_tfm *tfm) { + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); return tfm->__crt_alg->cra_cipher.cia_min_keysize; } static inline unsigned int crypto_tfm_alg_max_keysize(struct crypto_tfm *tfm) { + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); return tfm->__crt_alg->cra_cipher.cia_max_keysize; } static inline unsigned int crypto_tfm_alg_ivsize(struct crypto_tfm *tfm) { + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER); return tfm->__crt_alg->cra_cipher.cia_ivsize; } @@ -229,6 +232,7 @@ static inline unsigned int crypto_tfm_alg_blocksize(struct crypto_tfm *tfm) static inline unsigned int crypto_tfm_alg_digestsize(struct crypto_tfm *tfm) { + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_DIGEST); return tfm->__crt_alg->cra_digest.dia_digestsize; } @@ -302,13 +306,13 @@ static inline void crypto_cipher_get_iv(struct crypto_tfm *tfm, static inline void crypto_comp_compress(struct crypto_tfm *tfm) { - BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMP); + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMPRESS); tfm->crt_compress.cot_compress(tfm); } static inline void crypto_comp_decompress(struct crypto_tfm *tfm) { - BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMP); + BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_COMPRESS); tfm->crt_compress.cot_decompress(tfm); } |
