Stopping decryption before EOF throws exception: Padding is invalid and cannot be removed

前端 未结 5 1789
刺人心
刺人心 2021-02-14 12:01

This is the scenario we have: We have huge encrypted files, in the order of gigabytes that we can decrypt correctly if we read them until the end. The problem arises when we ar

5条回答
  •  Happy的楠姐
    2021-02-14 12:52

    Can you turn off padding?

    // aes.Padding = PaddingMode.PKCS7;
    aes.Padding = PaddingMode.None;
    

提交回复
热议问题