UNPKG

@wildboar/pkcs

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