Try Catch ex As System.Security.Cryptography.CryptographicExceptionThrow New System.Security.Cryptography.CryptographicException("Not a valid keyfile or passwordDim Encrypter As New Encryption Encrypte
decryptedStream.Length)End Function
尝试解密特定长度的字符串时会出现该错误当字符串是一个社会保障# (11个字符,包括破折号),然后抛出“输入数据不是一个完整的块”CryptographicException。例如,如果我传入一个恰好是8个字符的字符串,那么一切都会按预期进行