Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
rfc5915.py33 linesDownload Raw Back to pyasn1_modules
1# This file is being contributed to pyasn1-modules software.2#3# Created by Russ Housley with assistance from asn1ate v.0.6.0.4#5# Copyright (c) 2019, Vigil Security, LLC6# License: http://snmplabs.com/pyasn1/license.html7#8# Elliptic Curve Private Key9#10# ASN.1 source from:11# https://www.rfc-editor.org/rfc/rfc5915.txt12 13from pyasn1.type import namedtype14from pyasn1.type import namedval15from pyasn1.type import tag16from pyasn1.type import univ17 18from pyasn1_modules import rfc548019 20 21class ECPrivateKey(univ.Sequence):22    pass23 24ECPrivateKey.componentType = namedtype.NamedTypes(25    namedtype.NamedType('version', univ.Integer(26        namedValues=namedval.NamedValues(('ecPrivkeyVer1', 1)))),27    namedtype.NamedType('privateKey', univ.OctetString()),28    namedtype.OptionalNamedType('parameters', rfc5480.ECParameters().subtype(29        explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))),30    namedtype.OptionalNamedType('publicKey', univ.BitString().subtype(31        explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 1)))32)33 
codekingpro/portable-devtools · Team Ai