mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-12-12 16:21:17 +08:00
feat(util): support SHA224/SHA384 calculation although call sha256/sha512 APIs
This commit is contained in:
@@ -46,6 +46,7 @@ static void sha256_libsodium_to_mbedtls(mbedtls_sha256_context *mb_ctx, crypto_h
|
||||
memcpy(mb_ctx->total, &ls_state->count, sizeof(mb_ctx->total));
|
||||
memcpy(mb_ctx->state, ls_state->state, sizeof(mb_ctx->state));
|
||||
memcpy(mb_ctx->buffer, ls_state->buf, sizeof(mb_ctx->buffer));
|
||||
mb_ctx->is224 = 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
@@ -47,6 +47,7 @@ static void sha512_libsodium_to_mbedtls(mbedtls_sha512_context *mb_ctx, crypto_h
|
||||
memcpy(mb_ctx->total, ls_state->count, sizeof(mb_ctx->total));
|
||||
memcpy(mb_ctx->state, ls_state->state, sizeof(mb_ctx->state));
|
||||
memcpy(mb_ctx->buffer, ls_state->buf, sizeof(mb_ctx->buffer));
|
||||
mb_ctx->is384 = 0;
|
||||
}
|
||||
|
||||
int
|
||||
|
||||
Reference in New Issue
Block a user