如何使用mbedtls逐块散列大文件?

时间:2019-09-09 14:37:30

标签: mbedtls

我想递归哈希一个大文件,我该如何使用mbedtls做到这一点?

Sub RoundedCorner5()
  Dim oShape As Shape
  Dim RadiusFactor As Single
  RadiusFactor = 50
  For Each oShape In ActiveWindow.Selection.ShapeRange
    With oShape
      .AutoShapeType = msoShapeRoundedRectangle
      .Adjustments(1) = (1 / (oShape.Height + oShape.Width)) * RadiusFactor
      .TextFrame.WordWrap = msoFalse
      .TextEffect.Alignment = msoTextEffectAlignmentCentered
    End With
  Next
End Sub

1 个答案:

答案 0 :(得分:1)

我已经做到了:

while(!isFileEOF(hFile))
  {
    u16FileRead(&binBuffer,200,sizeof(binBuffer),hFile);
    mbedtls_sha256_update_ret(&ctx, &binBuffer, sizeof(binBuffer));
  }
mbedtls_sha256_finish_ret(&ctx, hash);