我需要使用另一家公司公开的网络服务。
他们告诉我在 OFB 模式下使用 Rijndael 来加密我发送给他们的数据,但显然,.Net (3.5) 不支持 Rijndael 的 OFB。它告诉我:(System.Security.Cryptography.CryptographicException: the (crypting?) mode is not valid for this algorithm
近似即时翻译)。
他们给了我一个 32 个字母数字字符的 IV。我不能使用它(使用System.Text.Encoding.ASCII.GetBytes(k)
),它告诉我:(System.Security.Cryptography.CryptographicException: the specified initialization vector (IV) does not match the block size for this algorithm
近似即时翻译)。密钥与 IV 的长度相同,并且可以正常工作。
我该怎么做才能让它发挥作用?
谢谢