未验证 提交 420c8b9e 编写于 作者: O openharmony_ci 提交者: Gitee

!1217 fix mbedtls sha256 interface

Merge pull request !1217 from cheng_jinsong/init0909
......@@ -137,9 +137,9 @@ static int GetSha256Value(const char *input, char *udid, int udidSize)
mbedtls_sha256_context context;
mbedtls_sha256_init(&context);
mbedtls_sha256_starts_ret(&context, 0);
mbedtls_sha256_update_ret(&context, (const unsigned char *)input, strlen(input));
mbedtls_sha256_finish_ret(&context, hash);
mbedtls_sha256_starts(&context, 0);
mbedtls_sha256_update(&context, (const unsigned char *)input, strlen(input));
mbedtls_sha256_finish(&context, hash);
for (size_t i = 0; i < HASH_LENGTH; i++) {
unsigned char value = hash[i];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册