public void FromXmlString(string xml, ECKeyXmlFormat format) { if (xml == null) { throw new ArgumentNullException("xml"); } if (format != ECKeyXmlFormat.Rfc4050) { throw new ArgumentOutOfRangeException("format"); } this.Key = Rfc4050KeyFormatter.FromXml(xml); }
public void FromXmlString(string xml, ECKeyXmlFormat format) { if (xml == null) { throw new ArgumentNullException("xml"); } if (format != ECKeyXmlFormat.Rfc4050) { throw new ArgumentOutOfRangeException("format"); } Key = Rfc4050KeyFormatter.FromXml(xml); }
public string ToXmlString(ECKeyXmlFormat format) { Contract.Ensures(Contract.Result <string>() != null); if (format != ECKeyXmlFormat.Rfc4050) { throw new ArgumentOutOfRangeException("format"); } ECParameters ecParams = ExportParameters(false); return(Rfc4050KeyFormatter.ToXml(ecParams, isEcdh: false)); }
public void FromXmlString(string xml, ECKeyXmlFormat format) { if (xml == null) { throw new ArgumentNullException("xml"); } if (format != ECKeyXmlFormat.Rfc4050) { throw new ArgumentOutOfRangeException("format"); } bool isEcdh; ECParameters parameters = Rfc4050KeyFormatter.FromXml(xml, out isEcdh); // .NET 4.6.2 allowed ECDsaCng to wrap ECDH keys because of interop with non-Windows PFX files. // As a result XML marked as ECDiffieHellman loaded just fine, so no check should be done on the // key type. ImportParameters(parameters); }
public void FromXmlString(string xml, ECKeyXmlFormat format) { if (xml == null) { throw new ArgumentNullException("xml"); } if (format != ECKeyXmlFormat.Rfc4050) { throw new ArgumentOutOfRangeException("format"); } bool isEcdh; ECParameters ecParams = Rfc4050KeyFormatter.FromXml(xml, out isEcdh); if (!isEcdh) { throw new ArgumentException(SR.GetString(SR.Cryptography_ArgECDHRequiresECDHKey), "xml"); } ImportParameters(ecParams); }
public string ToXmlString(ECKeyXmlFormat format) => throw new PlatformNotSupportedException();
public void FromXmlString(string xml, ECKeyXmlFormat format) => throw new PlatformNotSupportedException();
public string ToXmlString(ECKeyXmlFormat format) { throw new NotImplementedException(); }
public void FromXmlString(string xml, ECKeyXmlFormat format) { throw new NotImplementedException(); }
public string ToXmlString(ECKeyXmlFormat format) { throw null; }
public string ToXmlString(ECKeyXmlFormat format) { if (format != ECKeyXmlFormat.Rfc4050) { throw new ArgumentOutOfRangeException("format"); } return Rfc4050KeyFormatter.ToXml(this.Key); }
public void FromXmlString(string xml, ECKeyXmlFormat format) { Contract.Ensures(System.Security.Cryptography.CngAlgorithmGroup.ECDsa == this.Key.AlgorithmGroup); Contract.Ensures(this.Key.AlgorithmGroup != null); }
public string ToXmlString(ECKeyXmlFormat format) { Contract.Ensures(Contract.Result<string>() != null); return default(string); }
public void FromXmlString(string xml, ECKeyXmlFormat format) { Contract.Ensures(System.Security.Cryptography.CngAlgorithmGroup.ECDsa == this.Key.AlgorithmGroup); Contract.Ensures(this.Key.AlgorithmGroup != null); }
public string ToXmlString(ECKeyXmlFormat format) { Contract.Ensures(Contract.Result <string>() != null); return(default(string)); }
public string ToXmlString(ECKeyXmlFormat format) { Contract.Ensures(Contract.Result<string>() != null); if (format != ECKeyXmlFormat.Rfc4050) { throw new ArgumentOutOfRangeException("format"); } return Rfc4050KeyFormatter.ToXml(Key); }
public void FromXmlString(string xml, ECKeyXmlFormat format) { throw null; }