PemObject.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. using System.Collections;
  5. using BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Collections;
  6. namespace BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.IO.Pem
  7. {
  8. public class PemObject
  9. : PemObjectGenerator
  10. {
  11. private string type;
  12. private IList headers;
  13. private byte[] content;
  14. public PemObject(string type, byte[] content)
  15. : this(type, BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Platform.CreateArrayList(), content)
  16. {
  17. }
  18. public PemObject(String type, IList headers, byte[] content)
  19. {
  20. this.type = type;
  21. this.headers = BestHTTP.SecureProtocol.Org.BouncyCastle.Utilities.Platform.CreateArrayList(headers);
  22. this.content = content;
  23. }
  24. public string Type
  25. {
  26. get { return type; }
  27. }
  28. public IList Headers
  29. {
  30. get { return headers; }
  31. }
  32. public byte[] Content
  33. {
  34. get { return content; }
  35. }
  36. public PemObject Generate()
  37. {
  38. return this;
  39. }
  40. }
  41. }
  42. #pragma warning restore
  43. #endif