diff options
-rw-r--r-- | include/crypto/skcipher.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/crypto/skcipher.h b/include/crypto/skcipher.h index 2f07b4f..f7a03a1 100644 --- a/include/crypto/skcipher.h +++ b/include/crypto/skcipher.h @@ -445,6 +445,13 @@ static inline void skcipher_request_free(struct skcipher_request *req) kzfree(req); } +static inline void skcipher_request_zero(struct skcipher_request *req) +{ + struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); + + memzero_explicit(req, sizeof(*req) + crypto_skcipher_reqsize(tfm)); +} + /** * skcipher_request_set_callback() - set asynchronous callback function * @req: request handle |