fortify2-js
Version:
MOST POWERFUL JavaScript Security Library! Military-grade cryptography + 19 enhanced object methods + quantum-resistant algorithms + perfect TypeScript support. More powerful than Lodash with built-in security.
123 lines (119 loc) • 4.58 kB
JavaScript
;
var secureObjectCore = require('./core/secure-object-core.js');
var sensitiveKeys = require('./encryption/sensitive-keys.js');
var cryptoHandler = require('./encryption/crypto-handler.js');
var metadataManager = require('./metadata/metadata-manager.js');
var eventManager = require('./events/event-manager.js');
var serializationHandler = require('./serialization/serialization-handler.js');
var idGenerator = require('./utils/id-generator.js');
var validation = require('./utils/validation.js');
/***************************************************************************
* FortifyJS - Secure Array Types
*
* This file contains type definitions for the SecureArray modular architecture
*
* @author Nehonix
*
* @license MIT
*
* Copyright (c) 2025 Nehonix. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
***************************************************************************** */
/**
* Main export file for SecureObject
*/
// Import the main SecureObject class first
/**
* Factory functions for common use cases
*/
/**
* Creates a new SecureObject with default settings
*/
function createSecureObject(...args) {
return new secureObjectCore.SecureObject(...args);
}
/**
* Creates a read-only SecureObject
*/
function createReadOnlySecureObject(data) {
return secureObjectCore.SecureObject.readOnly(data);
}
/**
* Creates a SecureObject with custom sensitive keys
*/
function createSecureObjectWithSensitiveKeys(initialData, sensitiveKeys, options) {
const obj = new secureObjectCore.SecureObject(initialData, options);
obj.setSensitiveKeys(sensitiveKeys);
return obj;
}
/**
* Creates a SecureObject from another SecureObject (deep copy)
*/
function cloneSecureObject(source) {
return secureObjectCore.SecureObject.from(source);
}
/**
* Version information
*/
const SECURE_OBJECT_VERSION = "2.0.0-modular";
/**
* Module information for debugging
*/
const MODULE_INFO = {
version: SECURE_OBJECT_VERSION,
architecture: "modular",
components: [
"core/secure-object-core",
"encryption/sensitive-keys",
"encryption/crypto-handler",
"metadata/metadata-manager",
"events/event-manager",
"serialization/serialization-handler",
"utils/id-generator",
"utils/validation",
],
features: [
"Modular architecture",
"Type-safe operations",
"Event system",
"Metadata tracking",
"Encryption support",
"Serialization options",
"Memory management",
"Validation utilities",
],
};
exports.SecureObject = secureObjectCore.SecureObject;
exports.default = secureObjectCore.SecureObject;
exports.DEFAULT_SENSITIVE_KEYS = sensitiveKeys.DEFAULT_SENSITIVE_KEYS;
exports.SensitiveKeysManager = sensitiveKeys.SensitiveKeysManager;
exports.CryptoHandler = cryptoHandler.CryptoHandler;
exports.MetadataManager = metadataManager.MetadataManager;
exports.EventManager = eventManager.EventManager;
exports.SerializationHandler = serializationHandler.SerializationHandler;
exports.IdGenerator = idGenerator.IdGenerator;
exports.ValidationUtils = validation.ValidationUtils;
exports.MODULE_INFO = MODULE_INFO;
exports.SECURE_OBJECT_VERSION = SECURE_OBJECT_VERSION;
exports.cloneSecureObject = cloneSecureObject;
exports.createReadOnlySecureObject = createReadOnlySecureObject;
exports.createSecureObject = createSecureObject;
exports.createSecureObjectWithSensitiveKeys = createSecureObjectWithSensitiveKeys;
//# sourceMappingURL=index.js.map