1 //------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All rights reserved.
3 //------------------------------------------------------------
5 namespace Microsoft.InfoCards
7 using System.IdentityModel.Tokens;
8 using System.Security.Cryptography;
9 using System.Security.Cryptography.Xml;
11 // copied from IdentityModel\CryptoHelper.cs and they need to be kept in sync. After V1, we need to rethink how we can have
12 // a single place to ask this question. Perhaps even add it as an extensibility
14 internal static class InfoCardCryptoHelper
17 internal static bool IsAsymmetricAlgorithm(string algorithm)
21 case SecurityAlgorithms.DsaSha1Signature:
22 case SecurityAlgorithms.RsaSha1Signature:
23 case SecurityAlgorithms.RsaSha256Signature:
24 case SecurityAlgorithms.RsaOaepKeyWrap:
25 case SecurityAlgorithms.RsaV15KeyWrap:
32 internal static bool IsSymmetricAlgorithm(string algorithm)
36 case SecurityAlgorithms.HmacSha1Signature:
37 case SecurityAlgorithms.HmacSha256Signature:
38 case SecurityAlgorithms.Aes128Encryption:
39 case SecurityAlgorithms.Aes192Encryption:
40 case SecurityAlgorithms.Aes256Encryption:
41 case SecurityAlgorithms.TripleDesEncryption:
42 case SecurityAlgorithms.Aes128KeyWrap:
43 case SecurityAlgorithms.Aes192KeyWrap:
44 case SecurityAlgorithms.Aes256KeyWrap:
45 case SecurityAlgorithms.TripleDesKeyWrap:
46 case SecurityAlgorithms.Psha1KeyDerivation:
47 case SecurityAlgorithms.Psha1KeyDerivationDec2005: