pkcs-ts
Version:
PKCS #1 through #15 (Except #11) - Private and Public Keys, Certificates, and More
37 lines • 2.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports._encode_URL = exports._decode_URL = exports._encode_URL_urlWithDigest = exports._decode_URL_urlWithDigest = exports.URL_urlWithDigest = void 0;
const tslib_1 = require("tslib");
const asn1_ts_1 = require("asn1-ts");
const $ = tslib_1.__importStar(require("asn1-ts/dist/node/functional"));
const URL_urlWithDigest_ta_1 = require("../PKCS-15/URL-urlWithDigest.ta");
var URL_urlWithDigest_ta_2 = require("../PKCS-15/URL-urlWithDigest.ta");
Object.defineProperty(exports, "URL_urlWithDigest", { enumerable: true, get: function () { return URL_urlWithDigest_ta_2.URL_urlWithDigest; } });
Object.defineProperty(exports, "_decode_URL_urlWithDigest", { enumerable: true, get: function () { return URL_urlWithDigest_ta_2._decode_URL_urlWithDigest; } });
Object.defineProperty(exports, "_encode_URL_urlWithDigest", { enumerable: true, get: function () { return URL_urlWithDigest_ta_2._encode_URL_urlWithDigest; } });
let _cached_decoder_for_URL = null;
function _decode_URL(el) {
if (!_cached_decoder_for_URL) {
_cached_decoder_for_URL = $._decode_inextensible_choice({
"UNIVERSAL 19": ["url", $._decodePrintableString],
"CONTEXT 3": [
"urlWithDigest",
$._decode_implicit(() => URL_urlWithDigest_ta_1._decode_URL_urlWithDigest),
],
});
}
return _cached_decoder_for_URL(el);
}
exports._decode_URL = _decode_URL;
let _cached_encoder_for_URL = null;
function _encode_URL(value, elGetter) {
if (!_cached_encoder_for_URL) {
_cached_encoder_for_URL = $._encode_choice({
url: $._encodePrintableString,
urlWithDigest: $._encode_implicit(asn1_ts_1.ASN1TagClass.context, 3, () => URL_urlWithDigest_ta_1._encode_URL_urlWithDigest, $.BER),
}, $.BER);
}
return _cached_encoder_for_URL(value, elGetter);
}
exports._encode_URL = _encode_URL;
//# sourceMappingURL=URL.ta.js.map