コード例 #1
0
 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);
 }
コード例 #2
0
ファイル: ECDsaCng.cs プロジェクト: sigma-random/mono
        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);
        }
コード例 #3
0
ファイル: ECDsaCng.cs プロジェクト: dox0/DotNet471RS3
        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));
        }
コード例 #4
0
ファイル: ECDsaCng.cs プロジェクト: dox0/DotNet471RS3
        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);
        }
コード例 #5
0
        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);
        }
コード例 #6
0
 public string ToXmlString(ECKeyXmlFormat format)
 => throw new PlatformNotSupportedException();
コード例 #7
0
 public void FromXmlString(string xml, ECKeyXmlFormat format)
 => throw new PlatformNotSupportedException();
コード例 #8
0
ファイル: ECDsaCng.cs プロジェクト: PlumpMath/CIL2Java
 public string ToXmlString(ECKeyXmlFormat format)
 {
     throw new NotImplementedException();
 }
コード例 #9
0
ファイル: ECDsaCng.cs プロジェクト: PlumpMath/CIL2Java
 public void FromXmlString(string xml, ECKeyXmlFormat format)
 {
     throw new NotImplementedException();
 }
コード例 #10
0
 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);
    }
コード例 #14
0
 public void FromXmlString(string xml, ECKeyXmlFormat format)
 {
     Contract.Ensures(System.Security.Cryptography.CngAlgorithmGroup.ECDsa == this.Key.AlgorithmGroup);
     Contract.Ensures(this.Key.AlgorithmGroup != null);
 }
コード例 #15
0
        public string ToXmlString(ECKeyXmlFormat format)
        {
            Contract.Ensures(Contract.Result <string>() != null);

            return(default(string));
        }
コード例 #16
0
        public string ToXmlString(ECKeyXmlFormat format) {
            Contract.Ensures(Contract.Result<string>() != null);

            if (format != ECKeyXmlFormat.Rfc4050) {
                throw new ArgumentOutOfRangeException("format");
            }

            return Rfc4050KeyFormatter.ToXml(Key);
        }
コード例 #17
0
 public void FromXmlString(string xml, ECKeyXmlFormat format)
 {
     throw null;
 }