UNPKG

@wildboar/pkcs

Version:
31 lines (30 loc) 1.83 kB
import { ASN1Element as _Element, NULL } from "asn1-ts"; import * as $ from "asn1-ts/dist/node/functional"; import { CommonDataObjectAttributes } from "../PKCS-15/CommonDataObjectAttributes.ta"; import { PKCS15Object } from "../PKCS-15/PKCS15Object.ta"; export { CommonDataObjectAttributes, _decode_CommonDataObjectAttributes, _encode_CommonDataObjectAttributes, } from "../PKCS-15/CommonDataObjectAttributes.ta"; export { PKCS15Object, _get_decoder_for_PKCS15Object, _get_encoder_for_PKCS15Object, } from "../PKCS-15/PKCS15Object.ta"; /** * @summary DataObject * @description * * ### ASN.1 Definition: * * ```asn1 * DataObject {DataObjectAttributes} ::= PKCS15Object {CommonDataObjectAttributes, NULL, DataObjectAttributes} * ``` */ export declare type DataObject<DataObjectAttributes> = PKCS15Object<CommonDataObjectAttributes, NULL, DataObjectAttributes>; /** * @summary Returns a function that will decode an ASN.1 element into a(n) DataObject * @function * @param {_Element} el The element being decoded. * @returns A function that will decode an ASN.1 element. */ export declare function _get_decoder_for_DataObject<DataObjectAttributes>(_decode_DataObjectAttributes: $.ASN1Decoder<DataObjectAttributes>): (el: _Element) => PKCS15Object<CommonDataObjectAttributes, null, DataObjectAttributes>; /** * @summary Returns a function that will encode a(n) DataObject into an ASN.1 Element. * @function * @returns A function that will encode a(n) DataObject as an ASN.1 element. */ export declare function _get_encoder_for_DataObject<DataObjectAttributes>(_encode_DataObjectAttributes: $.ASN1Encoder<DataObjectAttributes>): (value: PKCS15Object<CommonDataObjectAttributes, null, DataObjectAttributes>, elGetter: $.ASN1Encoder<PKCS15Object<CommonDataObjectAttributes, null, DataObjectAttributes>>) => _Element;