mirror of
https://github.com/espressif/openthread.git
synced 2026-08-31 06:19:54 +00:00
[crypto] update SHA256 to new mbedtls APIs (#2756)
This commit is contained in:
@@ -48,17 +48,17 @@ Sha256::~Sha256()
|
||||
|
||||
void Sha256::Start(void)
|
||||
{
|
||||
mbedtls_sha256_starts(&mContext, 0);
|
||||
mbedtls_sha256_starts_ret(&mContext, 0);
|
||||
}
|
||||
|
||||
void Sha256::Update(const uint8_t *aBuf, uint16_t aBufLength)
|
||||
{
|
||||
mbedtls_sha256_update(&mContext, aBuf, aBufLength);
|
||||
mbedtls_sha256_update_ret(&mContext, aBuf, aBufLength);
|
||||
}
|
||||
|
||||
void Sha256::Finish(uint8_t aHash[kHashSize])
|
||||
{
|
||||
mbedtls_sha256_finish(&mContext, aHash);
|
||||
mbedtls_sha256_finish_ret(&mContext, aHash);
|
||||
}
|
||||
|
||||
} // namespace Crypto
|
||||
|
||||
Reference in New Issue
Block a user