codekingpro/portable-devtools
114k
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, LLC7# License: http://snmplabs.com/pyasn1/license.html8#9# ChaCha20Poly1305 algorithm fo use with the Authenticated-Enveloped-Data10# protecting content type for the Cryptographic Message Syntax (CMS)11#12# ASN.1 source from:13# https://www.rfc-editor.org/rfc/rfc8103.txt14 15from pyasn1.type import constraint16from pyasn1.type import univ17 18 19def _OID(*components):20 output = []21 for x in tuple(components):22 if isinstance(x, univ.ObjectIdentifier):23 output.extend(list(x))24 else:25 output.append(int(x))26 27 return univ.ObjectIdentifier(output)28 29 30class AEADChaCha20Poly1305Nonce(univ.OctetString):31 pass32 33 34AEADChaCha20Poly1305Nonce.subtypeSpec = constraint.ValueSizeConstraint(12, 12)35 36id_alg_AEADChaCha20Poly1305 = _OID(1, 2, 840, 113549, 1, 9, 16, 3, 18)37 