mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[CRYPTO] api: Added crypto_type support
This patch adds the crypto_type structure which will be used for all new crypto algorithm types, beginning with block ciphers. The primary purpose of this abstraction is to allow different crypto_type objects for crypto algorithms of the same type, in particular, there will be a different crypto_type objects for asynchronous algorithms. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
8f21cf0d2b
commit
e853c3cfa8
4 changed files with 38 additions and 10 deletions
|
@ -90,6 +90,7 @@
|
|||
|
||||
struct scatterlist;
|
||||
struct crypto_tfm;
|
||||
struct crypto_type;
|
||||
|
||||
struct cipher_desc {
|
||||
struct crypto_tfm *tfm;
|
||||
|
@ -161,6 +162,8 @@ struct crypto_alg {
|
|||
char cra_name[CRYPTO_MAX_ALG_NAME];
|
||||
char cra_driver_name[CRYPTO_MAX_ALG_NAME];
|
||||
|
||||
const struct crypto_type *cra_type;
|
||||
|
||||
union {
|
||||
struct cipher_alg cipher;
|
||||
struct digest_alg digest;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue