UNPKG

@wildboar/pkcs

Version:
39 lines 1.33 kB
import { ECPoint } from "@wildboar/ansi-x9-62"; import { ASN1Element as _Element } from "@wildboar/asn1"; import * as $ from "@wildboar/asn1/functional"; import { SubjectPublicKeyInfo } from "@wildboar/x500/AuthenticationFramework"; /** * @summary ECPublicKeyChoice * @description * * ### ASN.1 Definition: * * ```asn1 * ECPublicKeyChoice ::= CHOICE { * raw ECPoint, * spki SubjectPublicKeyInfo, -- See X.509. Must contain a public EC key * ... * } * ``` */ export type ECPublicKeyChoice = { raw: ECPoint; } | { spki: SubjectPublicKeyInfo; } | _Element; /** * @summary Decodes an ASN.1 element into a(n) ECPublicKeyChoice * @function * @param {_Element} el The element being decoded. * @returns {ECPublicKeyChoice} The decoded data structure. */ export declare function _decode_ECPublicKeyChoice(el: _Element): ECPublicKeyChoice; /** * @summary Encodes a(n) ECPublicKeyChoice 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 ECPublicKeyChoice, encoded as an ASN.1 Element. */ export declare function _encode_ECPublicKeyChoice(value: ECPublicKeyChoice, elGetter: $.ASN1Encoder<ECPublicKeyChoice>): _Element; //# sourceMappingURL=ECPublicKeyChoice.ta.d.mts.map