GetDsaKeyPair() public static method

public static GetDsaKeyPair ( DSA dsa ) : AsymmetricCipherKeyPair
dsa System.Security.Cryptography.DSA
return Org.BouncyCastle.Crypto.AsymmetricCipherKeyPair
Ejemplo n.º 1
0
 public static AsymmetricCipherKeyPair GetKeyPair(AsymmetricAlgorithm privateKey)
 {
     if (privateKey is DSA)
     {
         return(DotNetUtilities.GetDsaKeyPair((DSA)privateKey));
     }
     if (privateKey is RSA)
     {
         return(DotNetUtilities.GetRsaKeyPair((RSA)privateKey));
     }
     throw new ArgumentException("Unsupported algorithm specified", "privateKey");
 }
Ejemplo n.º 2
0
 public static AsymmetricCipherKeyPair GetKeyPair(AsymmetricAlgorithm privateKey)
 {
     //IL_0009: Unknown result type (might be due to invalid IL or missing references)
     //IL_0013: Expected O, but got Unknown
     //IL_001d: Unknown result type (might be due to invalid IL or missing references)
     //IL_0027: Expected O, but got Unknown
     //IL_0032: Unknown result type (might be due to invalid IL or missing references)
     if (privateKey is DSA)
     {
         return(DotNetUtilities.GetDsaKeyPair((DSA)privateKey));
     }
     if (privateKey is RSA)
     {
         return(DotNetUtilities.GetRsaKeyPair((RSA)privateKey));
     }
     throw new ArgumentException("Unsupported algorithm specified", "privateKey");
 }
Ejemplo n.º 3
0
 public static AsymmetricCipherKeyPair GetDsaKeyPair(DSA dsa)
 {
     return(DotNetUtilities.GetDsaKeyPair(dsa.ExportParameters(true)));
 }