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"); }
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"); }
public static AsymmetricCipherKeyPair GetDsaKeyPair(DSA dsa) { return(DotNetUtilities.GetDsaKeyPair(dsa.ExportParameters(true))); }