rfc8103.py 1017 B

123456789101112131415161718192021222324252627282930313233343536
  1. # This file is being contributed to pyasn1-modules software.
  2. #
  3. # Created by Russ Housley with assistance from the asn1ate tool.
  4. # Auto-generated by asn1ate v.0.6.0 from rfc8103.asn.
  5. #
  6. # Copyright (c) 2019, Vigil Security, LLC
  7. # License: http://snmplabs.com/pyasn1/license.html
  8. #
  9. # ChaCha20Poly1305 algorithm fo use with the Authenticated-Enveloped-Data
  10. # protecting content type for the Cryptographic Message Syntax (CMS)
  11. #
  12. # ASN.1 source from:
  13. # https://www.rfc-editor.org/rfc/rfc8103.txt
  14. from pyasn1.type import constraint
  15. from pyasn1.type import univ
  16. def _OID(*components):
  17. output = []
  18. for x in tuple(components):
  19. if isinstance(x, univ.ObjectIdentifier):
  20. output.extend(list(x))
  21. else:
  22. output.append(int(x))
  23. return univ.ObjectIdentifier(output)
  24. class AEADChaCha20Poly1305Nonce(univ.OctetString):
  25. pass
  26. AEADChaCha20Poly1305Nonce.subtypeSpec = constraint.ValueSizeConstraint(12, 12)
  27. id_alg_AEADChaCha20Poly1305 = _OID(1, 2, 840, 113549, 1, 9, 16, 3, 18)