crypto: api - Move low-level functions into algapi.h

A number of low-level functions were exposed in crypto.h.  Move
them into algapi.h (and internal.h).

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Herbert Xu
2023-04-03 12:48:42 +08:00
parent 8ae8a494ea
commit 01f727cdc4
4 changed files with 29 additions and 34 deletions

View File

@@ -49,6 +49,7 @@ struct crypto_instance;
struct module;
struct notifier_block;
struct rtattr;
struct scatterlist;
struct seq_file;
struct sk_buff;
@@ -132,6 +133,14 @@ struct crypto_attr_type {
u32 mask;
};
/*
* Algorithm registration interface.
*/
int crypto_register_alg(struct crypto_alg *alg);
void crypto_unregister_alg(struct crypto_alg *alg);
int crypto_register_algs(struct crypto_alg *algs, int count);
void crypto_unregister_algs(struct crypto_alg *algs, int count);
void crypto_mod_put(struct crypto_alg *alg);
int crypto_register_template(struct crypto_template *tmpl);
@@ -263,4 +272,9 @@ static inline void crypto_request_complete(struct crypto_async_request *req,
req->complete(req->data, err);
}
static inline u32 crypto_tfm_alg_type(struct crypto_tfm *tfm)
{
return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK;
}
#endif /* _CRYPTO_ALGAPI_H */