mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[CRYPTO] cipher: Added encrypt_one/decrypt_one
This patch adds two new operations for the simple cipher that encrypts or decrypts a single block at a time. This will be the main interface after the existing block operations have moved over to the new block ciphers. It also adds the crypto_cipher type which is currently only used on the new operations but will be extended to setkey as well once existing users have been converted to use block ciphers where applicable. Signed-off-by: Herbert Xu <[email protected]>
This commit is contained in:
parent
e853c3cfa8
commit
f28776a369
3 changed files with 149 additions and 0 deletions
|
|
@ -69,5 +69,10 @@ static inline void *crypto_instance_ctx(struct crypto_instance *inst)
|
|||
return inst->__ctx;
|
||||
}
|
||||
|
||||
static inline struct cipher_alg *crypto_cipher_alg(struct crypto_cipher *tfm)
|
||||
{
|
||||
return &crypto_cipher_tfm(tfm)->__crt_alg->cra_cipher;
|
||||
}
|
||||
|
||||
#endif /* _CRYPTO_ALGAPI_H */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue