PemObject.cs 917 B

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