DerOctetString.cs 763 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. namespace Org.BouncyCastle.Asn1
  3. {
  4. public class DerOctetString
  5. : Asn1OctetString
  6. {
  7. /// <param name="str">The octets making up the octet string.</param>
  8. public DerOctetString(
  9. byte[] str)
  10. : base(str)
  11. {
  12. }
  13. public DerOctetString(
  14. Asn1Encodable obj)
  15. : base(obj)
  16. {
  17. }
  18. internal override void Encode(
  19. DerOutputStream derOut)
  20. {
  21. derOut.WriteEncoded(Asn1Tags.OctetString, str);
  22. }
  23. internal static void Encode(
  24. DerOutputStream derOut,
  25. byte[] bytes,
  26. int offset,
  27. int length)
  28. {
  29. derOut.WriteEncoded(Asn1Tags.OctetString, bytes, offset, length);
  30. }
  31. }
  32. }
  33. #endif