@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
40 lines • 1.15 kB
text/typescript
import { ASN1Element as _Element, PrintableString } from "@wildboar/asn1";
import * as $ from "@wildboar/asn1/functional";
import { URL_urlWithDigest } from "../PKCS-15/URL-urlWithDigest.ta.mjs";
/**
* @summary URL
* @description
*
* ### ASN.1 Definition:
*
* ```asn1
* URL ::= CHOICE {
* url PrintableString,
* urlWithDigest [3] SEQUENCE {
* url IA5String,
* digest DigestInfoWithDefault
* }
* }
* ```
*/
export type URL = {
url: PrintableString;
} | {
urlWithDigest: URL_urlWithDigest;
};
/**
* @summary Decodes an ASN.1 element into a(n) URL
* @function
* @param {_Element} el The element being decoded.
* @returns {URL} The decoded data structure.
*/
export declare function _decode_URL(el: _Element): URL;
/**
* @summary Encodes a(n) URL into an ASN.1 Element.
* @function
* @param value The element being encoded.
* @param elGetter A function that can be used to get new ASN.1 elements.
* @returns {_Element} The URL, encoded as an ASN.1 Element.
*/
export declare function _encode_URL(value: URL, elGetter: $.ASN1Encoder<URL>): _Element;
//# sourceMappingURL=URL.ta.d.mts.map