UNPKG

@wildboar/pki-stub

Version:
31 lines (30 loc) 1.05 kB
import { ASN1Element as _Element } from "asn1-ts"; import * as $ from "asn1-ts/dist/node/functional"; import { SIGNED } from "../PKI-Stub/SIGNED.ta"; import { TBSCertificate } from "../PKI-Stub/TBSCertificate.ta"; /** * @summary Certificate * @description * * ### ASN.1 Definition: * * ```asn1 * Certificate ::= SIGNED{TBSCertificate} * ``` */ export declare type Certificate = SIGNED<TBSCertificate>; /** * @summary Decodes an ASN.1 element into a(n) Certificate * @function * @param {_Element} el The element being decoded. * @returns {Certificate} The decoded data structure. */ export declare function _decode_Certificate(el: _Element): Certificate; /** * @summary Encodes a(n) Certificate 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 Certificate, encoded as an ASN.1 Element. */ export declare function _encode_Certificate(value: Certificate, elGetter: $.ASN1Encoder<Certificate>): _Element;