PemObject.cs 919 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. using System;
  3. using System.Collections;
  4. using Org.BouncyCastle.Utilities.Collections;
  5. namespace Org.BouncyCastle.Utilities.IO.Pem
  6. {
  7. public class PemObject
  8. : PemObjectGenerator
  9. {
  10. private string type;
  11. private IList headers;
  12. private byte[] content;
  13. public PemObject(string type, byte[] content)
  14. : this(type, Org.BouncyCastle.Utilities.Platform.CreateArrayList(), content)
  15. {
  16. }
  17. public PemObject(String type, IList headers, byte[] content)
  18. {
  19. this.type = type;
  20. this.headers = Org.BouncyCastle.Utilities.Platform.CreateArrayList(headers);
  21. this.content = content;
  22. }
  23. public string Type
  24. {
  25. get { return type; }
  26. }
  27. public IList 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. #endif