我想递归地散列一个大文件,如何使用mbedtls来实现呢?
while(!isFileEOF(hFile))
{
u16FileRead(&binBuffer,200,sizeof(binBuffer),hFile);
mbedtls_sha256_ret(&binBuffer, sizeof(binBuffer), output, 0);
mbedtls_sha256_update_ret(&ctx, &output, sizeof(output));
mbedtls_sha256_update_ret(&ctx, &output, sizeof(output));
}
mbedtls_sha256_finish_ret(&ctx, hash);发布于 2019-09-10 18:25:01
我已经做到了这一点:
while(!isFileEOF(hFile))
{
u16FileRead(&binBuffer,200,sizeof(binBuffer),hFile);
mbedtls_sha256_update_ret(&ctx, &binBuffer, sizeof(binBuffer));
}
mbedtls_sha256_finish_ret(&ctx, hash);https://stackoverflow.com/questions/57856188
复制相似问题