@wildboar/pkcs
Version:
Public Key Cryptography Standard PDUs in TypeScript
76 lines • 2.58 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports._encode_Version = exports._decode_Version = exports.v2 = exports.Version_v2 = exports.v1 = exports.Version_v1 = void 0;
const $ = require("asn1-ts/dist/node/functional");
/* END_OF_SYMBOL_DEFINITION Version */
/* START_OF_SYMBOL_DEFINITION Version_v1 */
/**
* @summary Version_v1
* @constant
* @type {number}
*/
exports.Version_v1 = 0; /* LONG_NAMED_INTEGER_VALUE */
/* END_OF_SYMBOL_DEFINITION Version_v1 */
/* START_OF_SYMBOL_DEFINITION v1 */
/**
* @summary Version_v1
* @constant
* @type {number}
*/
exports.v1 = exports.Version_v1; /* SHORT_NAMED_INTEGER_VALUE */
/* END_OF_SYMBOL_DEFINITION v1 */
/* START_OF_SYMBOL_DEFINITION Version_v2 */
/**
* @summary Version_v2
* @constant
* @type {number}
*/
exports.Version_v2 = 1; /* LONG_NAMED_INTEGER_VALUE */
/* END_OF_SYMBOL_DEFINITION Version_v2 */
/* START_OF_SYMBOL_DEFINITION v2 */
/**
* @summary Version_v2
* @constant
* @type {number}
*/
exports.v2 = exports.Version_v2; /* SHORT_NAMED_INTEGER_VALUE */
/* END_OF_SYMBOL_DEFINITION v2 */
/* START_OF_SYMBOL_DEFINITION _cached_decoder_for_Version */
let _cached_decoder_for_Version = null;
/* END_OF_SYMBOL_DEFINITION _cached_decoder_for_Version */
/* START_OF_SYMBOL_DEFINITION _decode_Version */
/**
* @summary Decodes an ASN.1 element into a(n) Version
* @function
* @param {_Element} el The element being decoded.
* @returns {Version} The decoded data structure.
*/
function _decode_Version(el) {
if (!_cached_decoder_for_Version) {
_cached_decoder_for_Version = $._decodeInteger;
}
return _cached_decoder_for_Version(el);
}
exports._decode_Version = _decode_Version;
/* END_OF_SYMBOL_DEFINITION _decode_Version */
/* START_OF_SYMBOL_DEFINITION _cached_encoder_for_Version */
let _cached_encoder_for_Version = null;
/* END_OF_SYMBOL_DEFINITION _cached_encoder_for_Version */
/* START_OF_SYMBOL_DEFINITION _encode_Version */
/**
* @summary Encodes a(n) Version 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 Version, encoded as an ASN.1 Element.
*/
function _encode_Version(value, elGetter) {
if (!_cached_encoder_for_Version) {
_cached_encoder_for_Version = $._encodeInteger;
}
return _cached_encoder_for_Version(value, elGetter);
}
exports._encode_Version = _encode_Version;
/* END_OF_SYMBOL_DEFINITION _encode_Version */
/* eslint-enable */
//# sourceMappingURL=Version.ta.js.map