BerApplicationSpecificParser.cs 610 B

1234567891011121314151617181920212223242526272829303132
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. using System;
  3. namespace Org.BouncyCastle.Asn1
  4. {
  5. public class BerApplicationSpecificParser
  6. : IAsn1ApplicationSpecificParser
  7. {
  8. private readonly int tag;
  9. private readonly Asn1StreamParser parser;
  10. internal BerApplicationSpecificParser(
  11. int tag,
  12. Asn1StreamParser parser)
  13. {
  14. this.tag = tag;
  15. this.parser = parser;
  16. }
  17. public IAsn1Convertible ReadObject()
  18. {
  19. return parser.ReadObject();
  20. }
  21. public Asn1Object ToAsn1Object()
  22. {
  23. return new BerApplicationSpecific(tag, parser.ReadVector());
  24. }
  25. }
  26. }
  27. #endif