@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
38 lines (37 loc) • 1.31 kB
TypeScript
import { ASN1Element as _Element, OCTET_STRING } from "asn1-ts";
import * as $ from "asn1-ts/dist/node/functional";
import { SubjectPublicKeyInfo } from "@wildboar/x500/src/lib/modules/AuthenticationFramework/SubjectPublicKeyInfo.ta";
/**
* @summary KEAPublicKeyChoice
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* KEAPublicKeyChoice ::= CHOICE {
* raw INTEGER,
* spki SubjectPublicKeyInfo, -- See X.509. Must contain a public KEA key
* ...
* }
* ```
*/
export declare type KEAPublicKeyChoice = {
raw: OCTET_STRING;
} | {
spki: SubjectPublicKeyInfo;
} | _Element;
/**
* @summary Decodes an ASN.1 element into a(n) KEAPublicKeyChoice
* @function
* @param {_Element} el The element being decoded.
* @returns {KEAPublicKeyChoice} The decoded data structure.
*/
export declare function _decode_KEAPublicKeyChoice(el: _Element): KEAPublicKeyChoice;
/**
* @summary Encodes a(n) KEAPublicKeyChoice 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 KEAPublicKeyChoice, encoded as an ASN.1 Element.
*/
export declare function _encode_KEAPublicKeyChoice(value: KEAPublicKeyChoice, elGetter: $.ASN1Encoder<KEAPublicKeyChoice>): _Element;