UNPKG

@wildboar/pkcs

Version:
44 lines 1.49 kB
import { ASN1Element as _Element } from "@wildboar/asn1"; import * as $ from "@wildboar/asn1/functional"; import { Identifier } from "../PKCS-15/Identifier.ta.mjs"; /** * @summary SecurityCondition * @description * * ### ASN.1 Definition: * * ```asn1 * SecurityCondition ::= CHOICE { * authId Identifier, * not [0] SecurityCondition, * and [1] SEQUENCE SIZE (2..pkcs15-ub-securityConditions) OF SecurityCondition, * or [2] SEQUENCE SIZE (2..pkcs15-ub-securityConditions) OF SecurityCondition, * ... -- For future extensions * } * ``` */ export type SecurityCondition = { authId: Identifier; } | { not: SecurityCondition; } | { and: SecurityCondition[]; } | { or: SecurityCondition[]; } | _Element; /** * @summary Decodes an ASN.1 element into a(n) SecurityCondition * @function * @param {_Element} el The element being decoded. * @returns {SecurityCondition} The decoded data structure. */ export declare function _decode_SecurityCondition(el: _Element): SecurityCondition; /** * @summary Encodes a(n) SecurityCondition into an ASN.1 Element. * @function * @param value The element being encoded. * @param elGetter A function that can be used to get new ASN.1 elements. * @returns {_Element} The SecurityCondition, encoded as an ASN.1 Element. */ export declare function _encode_SecurityCondition(value: SecurityCondition, elGetter: $.ASN1Encoder<SecurityCondition>): _Element; //# sourceMappingURL=SecurityCondition.ta.d.mts.map