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 RSA ToRSA(RsaKeyParameters rsaKey) { return(DotNetUtilities.CreateRSAProvider(DotNetUtilities.ToRSAParameters(rsaKey))); }
public static RsaKeyParameters GetRsaPublicKey(RSA rsa) { return(DotNetUtilities.GetRsaPublicKey(rsa.ExportParameters(false))); }
public static AsymmetricCipherKeyPair GetRsaKeyPair(RSA rsa) { return(DotNetUtilities.GetRsaKeyPair(rsa.ExportParameters(true))); }
public static DsaPublicKeyParameters GetDsaPublicKey(DSA dsa) { return(DotNetUtilities.GetDsaPublicKey(dsa.ExportParameters(false))); }
public static RSA ToRSA(RsaPrivateKeyStructure privKey) { return(DotNetUtilities.CreateRSAProvider(DotNetUtilities.ToRSAParameters(privKey))); }