LazyASN1InputStream.cs 628 B

123456789101112131415161718192021222324252627282930313233343536
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. using System;
  3. using System.IO;
  4. namespace Org.BouncyCastle.Asn1
  5. {
  6. public class LazyAsn1InputStream
  7. : Asn1InputStream
  8. {
  9. public LazyAsn1InputStream(
  10. byte[] input)
  11. : base(input)
  12. {
  13. }
  14. public LazyAsn1InputStream(
  15. Stream inputStream)
  16. : base(inputStream)
  17. {
  18. }
  19. internal override DerSequence CreateDerSequence(
  20. DefiniteLengthInputStream dIn)
  21. {
  22. return new LazyDerSequence(dIn.ToArray());
  23. }
  24. internal override DerSet CreateDerSet(
  25. DefiniteLengthInputStream dIn)
  26. {
  27. return new LazyDerSet(dIn.ToArray());
  28. }
  29. }
  30. }
  31. #endif