pkcs-ts
Version:
PKCS #1 through #15 (Except #11) - Private and Public Keys, Certificates, and More
91 lines • 7.57 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports._encode_FingerPrint = exports._decode_FingerPrint = exports._extension_additions_list_spec_for_FingerPrint = exports._root_component_type_list_2_spec_for_FingerPrint = exports._root_component_type_list_1_spec_for_FingerPrint = exports.FingerPrint = exports._enum_for_FingerPrint_hand = exports._encode_FingerPrint_hand = exports._decode_FingerPrint_hand = exports.right = exports.left = exports.FingerPrint_hand_right = exports.FingerPrint_hand_left = exports.FingerPrint_hand = exports._enum_for_FingerPrint_finger = exports._encode_FingerPrint_finger = exports._decode_FingerPrint_finger = exports.thumb = exports.ringFinger = exports.pointerFinger = exports.middleFinger = exports.littleFinger = exports.FingerPrint_finger_thumb = exports.FingerPrint_finger_ringFinger = exports.FingerPrint_finger_pointerFinger = exports.FingerPrint_finger_middleFinger = exports.FingerPrint_finger_littleFinger = exports.FingerPrint_finger = 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 FingerPrint_finger_ta_1 = require("../PKCS-15/FingerPrint-finger.ta");
const FingerPrint_hand_ta_1 = require("../PKCS-15/FingerPrint-hand.ta");
var FingerPrint_finger_ta_2 = require("../PKCS-15/FingerPrint-finger.ta");
Object.defineProperty(exports, "FingerPrint_finger", { enumerable: true, get: function () { return FingerPrint_finger_ta_2.FingerPrint_finger; } });
Object.defineProperty(exports, "FingerPrint_finger_littleFinger", { enumerable: true, get: function () { return FingerPrint_finger_ta_2.FingerPrint_finger_littleFinger; } });
Object.defineProperty(exports, "FingerPrint_finger_middleFinger", { enumerable: true, get: function () { return FingerPrint_finger_ta_2.FingerPrint_finger_middleFinger; } });
Object.defineProperty(exports, "FingerPrint_finger_pointerFinger", { enumerable: true, get: function () { return FingerPrint_finger_ta_2.FingerPrint_finger_pointerFinger; } });
Object.defineProperty(exports, "FingerPrint_finger_ringFinger", { enumerable: true, get: function () { return FingerPrint_finger_ta_2.FingerPrint_finger_ringFinger; } });
Object.defineProperty(exports, "FingerPrint_finger_thumb", { enumerable: true, get: function () { return FingerPrint_finger_ta_2.FingerPrint_finger_thumb; } });
Object.defineProperty(exports, "littleFinger", { enumerable: true, get: function () { return FingerPrint_finger_ta_2.littleFinger; } });
Object.defineProperty(exports, "middleFinger", { enumerable: true, get: function () { return FingerPrint_finger_ta_2.middleFinger; } });
Object.defineProperty(exports, "pointerFinger", { enumerable: true, get: function () { return FingerPrint_finger_ta_2.pointerFinger; } });
Object.defineProperty(exports, "ringFinger", { enumerable: true, get: function () { return FingerPrint_finger_ta_2.ringFinger; } });
Object.defineProperty(exports, "thumb", { enumerable: true, get: function () { return FingerPrint_finger_ta_2.thumb; } });
Object.defineProperty(exports, "_decode_FingerPrint_finger", { enumerable: true, get: function () { return FingerPrint_finger_ta_2._decode_FingerPrint_finger; } });
Object.defineProperty(exports, "_encode_FingerPrint_finger", { enumerable: true, get: function () { return FingerPrint_finger_ta_2._encode_FingerPrint_finger; } });
Object.defineProperty(exports, "_enum_for_FingerPrint_finger", { enumerable: true, get: function () { return FingerPrint_finger_ta_2._enum_for_FingerPrint_finger; } });
var FingerPrint_hand_ta_2 = require("../PKCS-15/FingerPrint-hand.ta");
Object.defineProperty(exports, "FingerPrint_hand", { enumerable: true, get: function () { return FingerPrint_hand_ta_2.FingerPrint_hand; } });
Object.defineProperty(exports, "FingerPrint_hand_left", { enumerable: true, get: function () { return FingerPrint_hand_ta_2.FingerPrint_hand_left; } });
Object.defineProperty(exports, "FingerPrint_hand_right", { enumerable: true, get: function () { return FingerPrint_hand_ta_2.FingerPrint_hand_right; } });
Object.defineProperty(exports, "left", { enumerable: true, get: function () { return FingerPrint_hand_ta_2.left; } });
Object.defineProperty(exports, "right", { enumerable: true, get: function () { return FingerPrint_hand_ta_2.right; } });
Object.defineProperty(exports, "_decode_FingerPrint_hand", { enumerable: true, get: function () { return FingerPrint_hand_ta_2._decode_FingerPrint_hand; } });
Object.defineProperty(exports, "_encode_FingerPrint_hand", { enumerable: true, get: function () { return FingerPrint_hand_ta_2._encode_FingerPrint_hand; } });
Object.defineProperty(exports, "_enum_for_FingerPrint_hand", { enumerable: true, get: function () { return FingerPrint_hand_ta_2._enum_for_FingerPrint_hand; } });
class FingerPrint {
constructor(hand, finger, _unrecognizedExtensionsList = []) {
this.hand = hand;
this.finger = finger;
this._unrecognizedExtensionsList = _unrecognizedExtensionsList;
}
static _from_object(_o) {
return new FingerPrint(_o.hand, _o.finger, _o._unrecognizedExtensionsList);
}
}
exports.FingerPrint = FingerPrint;
FingerPrint._enum_for_hand = FingerPrint_hand_ta_1._enum_for_FingerPrint_hand;
FingerPrint._enum_for_finger = FingerPrint_finger_ta_1._enum_for_FingerPrint_finger;
exports._root_component_type_list_1_spec_for_FingerPrint = [
new $.ComponentSpec("hand", false, $.hasTag(asn1_ts_1.ASN1TagClass.universal, 10), undefined, undefined),
new $.ComponentSpec("finger", false, $.hasTag(asn1_ts_1.ASN1TagClass.universal, 10), undefined, undefined),
];
exports._root_component_type_list_2_spec_for_FingerPrint = [];
exports._extension_additions_list_spec_for_FingerPrint = [];
let _cached_decoder_for_FingerPrint = null;
function _decode_FingerPrint(el) {
if (!_cached_decoder_for_FingerPrint) {
_cached_decoder_for_FingerPrint = function (el) {
const sequence = el.sequence;
if (sequence.length < 2) {
throw new asn1_ts_1.ASN1ConstructionError("FingerPrint contained only " +
sequence.length.toString() +
" elements.");
}
sequence[0].name = "hand";
sequence[1].name = "finger";
let hand;
let finger;
hand = FingerPrint_hand_ta_1._decode_FingerPrint_hand(sequence[0]);
finger = FingerPrint_finger_ta_1._decode_FingerPrint_finger(sequence[1]);
return new FingerPrint(hand, finger, sequence.slice(2));
};
}
return _cached_decoder_for_FingerPrint(el);
}
exports._decode_FingerPrint = _decode_FingerPrint;
let _cached_encoder_for_FingerPrint = null;
function _encode_FingerPrint(value, elGetter) {
if (!_cached_encoder_for_FingerPrint) {
_cached_encoder_for_FingerPrint = function (value, elGetter) {
return $._encodeSequence([]
.concat([
FingerPrint_hand_ta_1._encode_FingerPrint_hand(value.hand, $.BER),
FingerPrint_finger_ta_1._encode_FingerPrint_finger(value.finger, $.BER),
], value._unrecognizedExtensionsList
? value._unrecognizedExtensionsList
: [])
.filter((c) => !!c), $.BER);
};
}
return _cached_encoder_for_FingerPrint(value, elGetter);
}
exports._encode_FingerPrint = _encode_FingerPrint;
//# sourceMappingURL=FingerPrint.ta.js.map