Adjust SM3 SM4 API

Remove sm3_digest. Use more _gmssl_export
This commit is contained in:
Zhi Guan
2024-04-19 18:32:06 +08:00
parent ab7c9a7651
commit 8cb306ad0b
17 changed files with 135 additions and 133 deletions

View File

@@ -1693,7 +1693,10 @@ int sm2_z256_point_from_hash(SM2_Z256_POINT *R, const uint8_t *data, size_t data
do {
// x = sm3(data) mod p
sm3_digest(data, datalen, dgst);
SM3_CTX sm3_ctx;
sm3_init(&sm3_ctx);
sm3_update(&sm3_ctx, data, datalen);
sm3_finish(&sm3_ctx, dgst);
sm2_z256_from_bytes(x, dgst);
if (sm2_z256_cmp(x, SM2_Z256_P) >= 0) {