UNPKG

@wildboar/pkcs

Version:
35 lines 1.22 kB
import * as $ from "@wildboar/asn1/functional"; import { Path } from "../PKCS-15/Path.ta.mjs"; import { URL } from "../PKCS-15/URL.ta.mjs"; /** * @summary ReferencedValue * @description * * ### ASN.1 Definition: * * ```asn1 * ReferencedValue {Type} ::= CHOICE { * path Path, * url URL * } (CONSTRAINED BY {-- 'path' or 'url' shall point to an object of type -- Type}) * ``` */ export type ReferencedValue<_Type> = { path: Path; } | { url: URL; }; /** * @summary Returns a function that will decode an ASN.1 element into a(n) ReferencedValue * @function * @param {_Element} el The element being decoded. * @returns A function that will decode an ASN.1 element. */ export declare function _get_decoder_for_ReferencedValue<Type>(_decode_Type: $.ASN1Decoder<Type>): $.ASN1Decoder<ReferencedValue<Type>>; /** * @summary Returns a function that will encode a(n) ReferencedValue into an ASN.1 Element. * @function * @returns A function that will encode a(n) ReferencedValue as an ASN.1 element. */ export declare function _get_encoder_for_ReferencedValue<Type>(_encode_Type: $.ASN1Encoder<Type>): $.ASN1Encoder<ReferencedValue<Type>>; //# sourceMappingURL=ReferencedValue.ta.d.mts.map