Re: [PATCH v6 4/4] crypto: starfive - Add hash and HMAC support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le 26/04/2023 à 08:58, Jia Jie Ho a écrit :
Adding hash/HMAC support for SHA-2 and SM3 to StarFive cryptographic
module.

Co-developed-by: Huan Feng <huan.feng-bONrM45KWFOXmMXjJBpWqg@xxxxxxxxxxxxxxxx>
Signed-off-by: Huan Feng <huan.feng-bONrM45KWFOXmMXjJBpWqg@xxxxxxxxxxxxxxxx>
Signed-off-by: Jia Jie Ho <jiajie.ho-bONrM45KWFOXmMXjJBpWqg@xxxxxxxxxxxxxxxx>
---
  drivers/crypto/starfive/Kconfig       |   4 +
  drivers/crypto/starfive/Makefile      |   2 +-
  drivers/crypto/starfive/jh7110-cryp.c |  38 ++
  drivers/crypto/starfive/jh7110-cryp.h |  70 +-
  drivers/crypto/starfive/jh7110-hash.c | 896 ++++++++++++++++++++++++++
  5 files changed, 1006 insertions(+), 4 deletions(-)
  create mode 100644 drivers/crypto/starfive/jh7110-hash.c


[...]

+int starfive_hash_register_algs(void)
+{
+	int ret = 0;
+
+	ret = crypto_register_ahashes(algs_sha2_sm3, ARRAY_SIZE(algs_sha2_sm3));
+
+	return ret;

Nit: return crypto_register_ahashes(algs_sha2_sm3, ARRAY_SIZE(algs_sha2_sm3));

?

+}
+
+void starfive_hash_unregister_algs(void)
+{
+	crypto_unregister_ahashes(algs_sha2_sm3, ARRAY_SIZE(algs_sha2_sm3));
+}




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux