summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorTianjia Zhang <tianjia.zhang@linux.alibaba.com>2020-09-20 18:20:54 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2020-09-25 09:48:53 +0200
commitf49282870fb039e3c2e5c3341bd27875282609d7 (patch)
tree0a5907437ebe5bf42e377157b0ea315715a6bfea /include/crypto
parentcrypto: hisilicon/qm - remove the update of flags (diff)
downloadlinux-f49282870fb039e3c2e5c3341bd27875282609d7.tar.xz
linux-f49282870fb039e3c2e5c3341bd27875282609d7.zip
crypto: sm3 - export crypto_sm3_final function
Both crypto_sm3_update and crypto_sm3_finup have been exported, exporting crypto_sm3_final, to avoid having to use crypto_sm3_finup(desc, NULL, 0, dgst) to calculate the hash in some cases. Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Tested-by: Xufeng Zhang <yunbo.xufeng@linux.alibaba.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/sm3.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto/sm3.h b/include/crypto/sm3.h
index 1438942dc773..42ea21289ba9 100644
--- a/include/crypto/sm3.h
+++ b/include/crypto/sm3.h
@@ -35,6 +35,8 @@ struct shash_desc;
extern int crypto_sm3_update(struct shash_desc *desc, const u8 *data,
unsigned int len);
+extern int crypto_sm3_final(struct shash_desc *desc, u8 *out);
+
extern int crypto_sm3_finup(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *hash);
#endif