UNPKG

@wildboar/pkcs

Version:
89 lines (88 loc) 2.02 kB
import { ASN1Element as _Element, INTEGER } from "asn1-ts"; import * as $ from "asn1-ts/dist/node/functional"; /** * @summary CMSVersion * @description * * ### ASN.1 Definition: * * ```asn1 * CMSVersion ::= INTEGER {v0(0), v1(1), v2(2), v3(3), v4(4)} * ``` */ export declare type CMSVersion = INTEGER; /** * @summary CMSVersion_v0 * @constant * @type {number} */ export declare const CMSVersion_v0: CMSVersion; /** * @summary CMSVersion_v0 * @constant * @type {number} */ export declare const v0: CMSVersion; /** * @summary CMSVersion_v1 * @constant * @type {number} */ export declare const CMSVersion_v1: CMSVersion; /** * @summary CMSVersion_v1 * @constant * @type {number} */ export declare const v1: CMSVersion; /** * @summary CMSVersion_v2 * @constant * @type {number} */ export declare const CMSVersion_v2: CMSVersion; /** * @summary CMSVersion_v2 * @constant * @type {number} */ export declare const v2: CMSVersion; /** * @summary CMSVersion_v3 * @constant * @type {number} */ export declare const CMSVersion_v3: CMSVersion; /** * @summary CMSVersion_v3 * @constant * @type {number} */ export declare const v3: CMSVersion; /** * @summary CMSVersion_v4 * @constant * @type {number} */ export declare const CMSVersion_v4: CMSVersion; /** * @summary CMSVersion_v4 * @constant * @type {number} */ export declare const v4: CMSVersion; /** * @summary Decodes an ASN.1 element into a(n) CMSVersion * @function * @param {_Element} el The element being decoded. * @returns {CMSVersion} The decoded data structure. */ export declare function _decode_CMSVersion(el: _Element): INTEGER; /** * @summary Encodes a(n) CMSVersion into an ASN.1 Element. * @function * @param {value} el The element being decoded. * @param elGetter A function that can be used to get new ASN.1 elements. * @returns {_Element} The CMSVersion, encoded as an ASN.1 Element. */ export declare function _encode_CMSVersion(value: CMSVersion, elGetter: $.ASN1Encoder<CMSVersion>): _Element;