public static DigestData CreateDigestData(DigestData digest, RSACryptoServiceProvider rsaCryptoProvider)
        {
            DigestData digestData = null;
            Type digestDataType = null;

            if (typePerAlgo.TryGetValue(GetAlgoHash(digest.Algorithm, digest.Hash), out digestDataType))
            {
                ConstructorInfo digestCstr = digestDataType.GetConstructor(new Type[] { typeof(DigestData), typeof(RSACryptoServiceProvider) });
                if (digestCstr != null)
                {
                    digestData = digestCstr.Invoke(new object[] { digest, rsaCryptoProvider }) as DigestData;
                }
            }

            return digestData;
        }
Example #2
0
 protected RSABase(DigestData digestData, RSACryptoServiceProvider rsaCryptoProvider)
     : base(digestData.Algorithm, digestData.Hash)
 {
     this.rsaCryptoProvider = rsaCryptoProvider;
     this.digest = digestData.Digest;
 }
 public RSAOAEPEncryptor(DigestData digestData, RSACryptoServiceProvider rsaCryptoProvider)
     : base(digestData, rsaCryptoProvider)
 {
 }
 public RSASHA1Signature(DigestData digestData, RSACryptoServiceProvider rsaCryptoProvider)
     : base(digestData, rsaCryptoProvider)
 {
 }
 public EncryptedKey(string userID, DigestData encrypted)
 {
     this.userID = userID;
     this.encrypted = encrypted;
 }