Does .NET support of AES OFB

2019-02-26 10:08发布

问题:

Does .NET has a class that supports AES OFB encryption?

I've tried to use AesCryptoServiceProvider but when I set the Mode to CipherMode.OFB I got an exception: Invalid algorithm specified

AesManaged doesn't allow feedback modes (based on the MSDN documentation)

回答1:

.Net 4.0 should

here is the reference

http://msdn.microsoft.com/en-us/library/0ss79b2x.aspx

Here are the cipher modes available

http://msdn.microsoft.com/en-us/library/system.security.cryptography.ciphermode.aspx



回答2:

The base SymmetricAlgorithm class only supports CipherModes of CBC & CFB.

This can be overridden, but is not done so in the AesCryptoServiceProvider class. Perhaps a 3rd party library may implement these Cipher Modes.

*Clarification: [I was looking at .Net v3.5]