GenericKey.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using BestHTTP.SecureProtocol.Org.BouncyCastle.Asn1.X509;
  5. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Crypto.Operators
  6. {
  7. public class GenericKey
  8. {
  9. private readonly AlgorithmIdentifier algorithmIdentifier;
  10. private readonly object representation;
  11. public GenericKey(object representation)
  12. {
  13. this.algorithmIdentifier = null;
  14. this.representation = representation;
  15. }
  16. public GenericKey(AlgorithmIdentifier algorithmIdentifier, byte[] representation)
  17. {
  18. this.algorithmIdentifier = algorithmIdentifier;
  19. this.representation = representation;
  20. }
  21. public GenericKey(AlgorithmIdentifier algorithmIdentifier, object representation)
  22. {
  23. this.algorithmIdentifier = algorithmIdentifier;
  24. this.representation = representation;
  25. }
  26. public AlgorithmIdentifier AlgorithmIdentifier
  27. {
  28. get { return algorithmIdentifier; }
  29. }
  30. public object Representation
  31. {
  32. get { return representation; }
  33. }
  34. }
  35. }
  36. #pragma warning restore
  37. #endif