ECNamedDomainParameters.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1;
  5. using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X9;
  6. using BestHTTP.SecureProtocol.Org.BouncyCastle.Math;
  7. using BestHTTP.SecureProtocol.Org.BouncyCastle.Math.EC;
  8. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Parameters
  9. {
  10. public class ECNamedDomainParameters
  11. : ECDomainParameters
  12. {
  13. private readonly DerObjectIdentifier name;
  14. public DerObjectIdentifier Name
  15. {
  16. get { return name; }
  17. }
  18. public ECNamedDomainParameters(DerObjectIdentifier name, ECDomainParameters dp)
  19. : this(name, dp.Curve, dp.G, dp.N, dp.H, dp.GetSeed())
  20. {
  21. }
  22. public ECNamedDomainParameters(DerObjectIdentifier name, X9ECParameters x9)
  23. : base(x9)
  24. {
  25. this.name = name;
  26. }
  27. public ECNamedDomainParameters(DerObjectIdentifier name, ECCurve curve, ECPoint g, BigInteger n)
  28. : base(curve, g, n)
  29. {
  30. this.name = name;
  31. }
  32. public ECNamedDomainParameters(DerObjectIdentifier name, ECCurve curve, ECPoint g, BigInteger n, BigInteger h)
  33. : base(curve, g, n, h)
  34. {
  35. this.name = name;
  36. }
  37. public ECNamedDomainParameters(DerObjectIdentifier name, ECCurve curve, ECPoint g, BigInteger n, BigInteger h, byte[] seed)
  38. : base(curve, g, n, h, seed)
  39. {
  40. this.name = name;
  41. }
  42. }
  43. }
  44. #pragma warning restore
  45. #endif