@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
65 lines • 3.6 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports._encode_BiometricType = exports._decode_BiometricType = exports._encode_IrisScan = exports._decode_IrisScan = exports.IrisScan = exports._encode_FingerPrint = exports._decode_FingerPrint = exports.FingerPrint = void 0;
/* eslint-disable */
const asn1_ts_1 = require("asn1-ts");
const $ = require("asn1-ts/dist/node/functional");
const FingerPrint_ta_1 = require("../PKCS-15/FingerPrint.ta");
const IrisScan_ta_1 = require("../PKCS-15/IrisScan.ta");
var FingerPrint_ta_2 = require("../PKCS-15/FingerPrint.ta");
Object.defineProperty(exports, "FingerPrint", { enumerable: true, get: function () { return FingerPrint_ta_2.FingerPrint; } });
Object.defineProperty(exports, "_decode_FingerPrint", { enumerable: true, get: function () { return FingerPrint_ta_2._decode_FingerPrint; } });
Object.defineProperty(exports, "_encode_FingerPrint", { enumerable: true, get: function () { return FingerPrint_ta_2._encode_FingerPrint; } });
var IrisScan_ta_2 = require("../PKCS-15/IrisScan.ta");
Object.defineProperty(exports, "IrisScan", { enumerable: true, get: function () { return IrisScan_ta_2.IrisScan; } });
Object.defineProperty(exports, "_decode_IrisScan", { enumerable: true, get: function () { return IrisScan_ta_2._decode_IrisScan; } });
Object.defineProperty(exports, "_encode_IrisScan", { enumerable: true, get: function () { return IrisScan_ta_2._encode_IrisScan; } });
/* END_OF_SYMBOL_DEFINITION BiometricType */
/* START_OF_SYMBOL_DEFINITION _cached_decoder_for_BiometricType */
let _cached_decoder_for_BiometricType = null;
/* END_OF_SYMBOL_DEFINITION _cached_decoder_for_BiometricType */
/* START_OF_SYMBOL_DEFINITION _decode_BiometricType */
/**
* @summary Decodes an ASN.1 element into a(n) BiometricType
* @function
* @param {_Element} el The element being decoded.
* @returns {BiometricType} The decoded data structure.
*/
function _decode_BiometricType(el) {
if (!_cached_decoder_for_BiometricType) {
_cached_decoder_for_BiometricType = $._decode_extensible_choice({
"UNIVERSAL 16": ["fingerPrint", FingerPrint_ta_1._decode_FingerPrint],
"CONTEXT 0": [
"irisScan",
$._decode_implicit(() => IrisScan_ta_1._decode_IrisScan),
],
});
}
return _cached_decoder_for_BiometricType(el);
}
exports._decode_BiometricType = _decode_BiometricType;
/* END_OF_SYMBOL_DEFINITION _decode_BiometricType */
/* START_OF_SYMBOL_DEFINITION _cached_encoder_for_BiometricType */
let _cached_encoder_for_BiometricType = null;
/* END_OF_SYMBOL_DEFINITION _cached_encoder_for_BiometricType */
/* START_OF_SYMBOL_DEFINITION _encode_BiometricType */
/**
* @summary Encodes a(n) BiometricType 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 BiometricType, encoded as an ASN.1 Element.
*/
function _encode_BiometricType(value, elGetter) {
if (!_cached_encoder_for_BiometricType) {
_cached_encoder_for_BiometricType = $._encode_choice({
fingerPrint: FingerPrint_ta_1._encode_FingerPrint,
irisScan: $._encode_implicit(asn1_ts_1.ASN1TagClass.context, 0, () => IrisScan_ta_1._encode_IrisScan, $.BER),
}, $.BER);
}
return _cached_encoder_for_BiometricType(value, elGetter);
}
exports._encode_BiometricType = _encode_BiometricType;
/* END_OF_SYMBOL_DEFINITION _encode_BiometricType */
/* eslint-enable */
//# sourceMappingURL=BiometricType.ta.js.map