AesCryptoServiceProvider not part of SymmetricAlgorithm?

Posted by user330006 on Stack Overflow See other posts from Stack Overflow or by user330006
Published on 2010-04-30T18:52:02Z Indexed on 2010/04/30 18:57 UTC
Read the original article Hit count: 294

I have a quick little app that steps through the possible symmetric encryption methods. I get them with the following line:

 private static List<Type> GetAlgorithmTypes
    {
        get { return Assembly.GetAssembly(typeof(SymmetricAlgorithm)).GetTypes().Where( type => type.IsSubclassOf(typeof(SymmetricAlgorithm))).ToList(); }
    }

As you can see when i run this, AesCryptoServiceProvider is not a member of this group, even though it inherits from AES, which does belong to SymmetricAlgorithm and shows up in my list. This wouldn't be so much of a problem, i can manually add the provider in the group if i have too, but then if i try to retrieve this type by its name:

Type t = Type.GetType("System.Security.Cryptography.AesCryptoServiceProvider");

i get a null object for AesCryptoServiceProvider, but not for any of the other items in the group.

This is really strange, and i'm wondering if anyone has any ideas. It's kinda making me need to use tripleDES because of this (since my machines are all running the FIPS compliance requirement).

Thanks for any help!

© Stack Overflow or respective owner

Related posts about c#

Related posts about cryptography