PopoDecKeyChallContent.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #if !BESTHTTP_DISABLE_ALTERNATE_SSL && (!UNITY_WEBGL || UNITY_EDITOR)
  2. #pragma warning disable
  3. using System;
  4. namespace Best.HTTP.SecureProtocol.Org.BouncyCastle.Asn1.Cmp
  5. {
  6. public class PopoDecKeyChallContent
  7. : Asn1Encodable
  8. {
  9. public static PopoDecKeyChallContent GetInstance(object obj)
  10. {
  11. if (obj is PopoDecKeyChallContent popoDecKeyChallContent)
  12. return popoDecKeyChallContent;
  13. if (obj != null)
  14. return new PopoDecKeyChallContent(Asn1Sequence.GetInstance(obj));
  15. return null;
  16. }
  17. private readonly Asn1Sequence m_content;
  18. private PopoDecKeyChallContent(Asn1Sequence seq)
  19. {
  20. m_content = seq;
  21. }
  22. public virtual Challenge[] ToChallengeArray()
  23. {
  24. return m_content.MapElements(Challenge.GetInstance);
  25. }
  26. /**
  27. * <pre>
  28. * PopoDecKeyChallContent ::= SEQUENCE OF Challenge
  29. * </pre>
  30. * @return a basic ASN.1 object representation.
  31. */
  32. public override Asn1Object ToAsn1Object()
  33. {
  34. return m_content;
  35. }
  36. }
  37. }
  38. #pragma warning restore
  39. #endif