harperdb 3.2.1 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -11
- package/bin/BinObjects.jsc +0 -0
- package/bin/harperdb.jsc +0 -0
- package/bin/install.jsc +0 -0
- package/bin/register.jsc +0 -0
- package/bin/run.jsc +0 -0
- package/bin/stop.jsc +0 -0
- package/bin/upgrade.jsc +0 -0
- package/bin/utility.jsc +0 -0
- package/bin/version.jsc +0 -0
- package/coverage/lcov.info +7142 -6704
- package/data_layer/CreateAttributeObject.jsc +0 -0
- package/data_layer/CreateTableObject.jsc +0 -0
- package/data_layer/DataLayerObjects.jsc +0 -0
- package/data_layer/DeleteBeforeObject.jsc +0 -0
- package/data_layer/DeleteObject.jsc +0 -0
- package/data_layer/DropAttributeObject.jsc +0 -0
- package/data_layer/InsertObject.jsc +0 -0
- package/data_layer/ReadTransactionLogObject.jsc +0 -0
- package/data_layer/SQLSearch.jsc +0 -0
- package/data_layer/SearchByConditionsObject.jsc +0 -0
- package/data_layer/SearchByHashObject.jsc +0 -0
- package/data_layer/SearchObject.jsc +0 -0
- package/data_layer/SqlSearchObject.jsc +0 -0
- package/data_layer/UpdateObject.jsc +0 -0
- package/data_layer/UpsertObject.jsc +0 -0
- package/data_layer/bulkLoad.jsc +0 -0
- package/data_layer/data_objects/BulkLoadObjects.jsc +0 -0
- package/data_layer/data_objects/UpsertObject.jsc +0 -0
- package/data_layer/delete.jsc +0 -0
- package/data_layer/export.jsc +0 -0
- package/data_layer/harperBridge/BridgeMethods.jsc +0 -0
- package/data_layer/harperBridge/bridgeUtility/checkForNewAttr.jsc +0 -0
- package/data_layer/harperBridge/bridgeUtility/convertOperationToTransaction.jsc +0 -0
- package/data_layer/harperBridge/bridgeUtility/evaluateTableGetAttributes.jsc +0 -0
- package/data_layer/harperBridge/bridgeUtility/insertUpdateReturnObj.jsc +0 -0
- package/data_layer/harperBridge/bridgeUtility/insertUpdateValidate.jsc +0 -0
- package/data_layer/harperBridge/harperBridge.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/LMDBBridge.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/DeleteTransactionsBeforeResults.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateAttribute.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateRecords.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateSchema.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbCreateTable.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteRecords.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteRecordsBefore.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbDeleteTransactionLogsBefore.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropAttribute.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropSchema.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbDropTable.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetDataByHash.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbGetDataByValue.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbReadTransactionLog.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByConditions.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByHash.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbSearchByValue.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbUpdateRecords.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbMethods/lmdbUpsertRecords.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/LMDBCreateAttributeObject.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/LMDBDeleteTransactionObject.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/LMDBInsertTransactionObject.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/LMDBTransactionObject.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/LMDBUpdateTransactionObject.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/LMDBUpsertTransactionObject.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/TableSizeObject.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/ThreadSearchObject.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/initializeHashSearch.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/initializePaths.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/lmdbCheckForNewAttributes.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/lmdbCreateTransactionsEnvironment.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/lmdbDropAllAttributes.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/lmdbGetTableSize.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/lmdbProcessRows.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/lmdbSearch.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/lmdbThreadSearch.jsc +0 -0
- package/data_layer/harperBridge/lmdbBridge/lmdbUtility/lmdbWriteTransaction.jsc +0 -0
- package/data_layer/hdbInfoController.jsc +0 -0
- package/data_layer/insert.jsc +0 -0
- package/data_layer/readTransactionLog.jsc +0 -0
- package/data_layer/schema.jsc +0 -0
- package/data_layer/schemaDescribe.jsc +0 -0
- package/data_layer/search.jsc +0 -0
- package/data_layer/update.jsc +0 -0
- package/events/ClusterStatusEmitter.jsc +0 -0
- package/events/SioServerStoppedEvent.jsc +0 -0
- package/events/SocketClusterStatusEmitter.jsc +0 -0
- package/license/LICENSE +91 -1
- package/node_modules/@msgpackr-extract/msgpackr-extract-linux-x64/README.md +1 -0
- package/node_modules/{node-addon-api/src/nothing.c → @msgpackr-extract/msgpackr-extract-linux-x64/index.js} +0 -0
- package/node_modules/@msgpackr-extract/msgpackr-extract-linux-x64/node.abi93.glibc.node +0 -0
- package/node_modules/@msgpackr-extract/msgpackr-extract-linux-x64/node.abi93.musl.node +0 -0
- package/node_modules/@msgpackr-extract/msgpackr-extract-linux-x64/node.napi.glibc.node +0 -0
- package/node_modules/@msgpackr-extract/msgpackr-extract-linux-x64/node.napi.musl.node +0 -0
- package/node_modules/@msgpackr-extract/msgpackr-extract-linux-x64/package.json +53 -0
- package/node_modules/{msgpackr-extract → lmdb-store}/.github/workflows/prebuild.yml +9 -10
- package/node_modules/lmdb-store/.idea/lmdb-store.iml +12 -0
- package/node_modules/lmdb-store/.idea/misc.xml +6 -0
- package/node_modules/lmdb-store/.idea/modules.xml +8 -0
- package/node_modules/lmdb-store/.idea/workspace.xml +4 -0
- package/node_modules/lmdb-store/README.md +393 -388
- package/node_modules/lmdb-store/benchmark/index.js +162 -162
- package/node_modules/lmdb-store/binding.gyp +79 -88
- package/node_modules/lmdb-store/caching.js +113 -113
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/COPYRIGHT +20 -20
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/Doxyfile +1631 -1631
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/LICENSE +47 -47
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/chacha8.c +183 -183
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/chacha8.h +14 -14
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/crypto.c +121 -121
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/intro.doc +192 -192
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mdb.c +12125 -12125
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mdb_copy.1 +74 -74
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mdb_copy.c +106 -106
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mdb_drop.1 +53 -53
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mdb_drop.c +154 -154
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mdb_dump.1 +94 -94
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mdb_dump.c +333 -333
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mdb_load.1 +97 -97
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mdb_load.c +530 -530
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mdb_stat.1 +83 -83
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mdb_stat.c +276 -276
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/midl.c +452 -452
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/midl.h +208 -208
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/module.c +101 -101
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/module.h +16 -16
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mtest.c +178 -178
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mtest2.c +124 -124
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mtest3.c +133 -133
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mtest4.c +168 -168
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mtest5.c +135 -135
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mtest6.c +141 -141
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mtest_enc.c +190 -190
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mtest_enc2.c +189 -189
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/mtest_remap.c +177 -177
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/sample-bdb.txt +73 -73
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/sample-mdb.txt +62 -62
- package/node_modules/lmdb-store/dependencies/lmdb/libraries/liblmdb/tooltag +27 -27
- package/node_modules/lmdb-store/dependencies/lz4/LICENSE +11 -11
- package/node_modules/lmdb-store/dependencies/lz4/lib/README.md +137 -137
- package/node_modules/lmdb-store/dependencies/lz4/lib/dll/example/README.md +69 -69
- package/node_modules/lmdb-store/dependencies/lz4/lib/lz4frame.c +1899 -1899
- package/node_modules/lmdb-store/dependencies/lz4/lib/xxhash.c +1030 -1030
- package/node_modules/lmdb-store/dependencies/lz4/lib/xxhash.h +328 -328
- package/node_modules/lmdb-store/dist/index.cjs +2591 -0
- package/node_modules/lmdb-store/dist/index.cjs.map +1 -0
- package/node_modules/lmdb-store/index.d.ts +323 -323
- package/node_modules/lmdb-store/index.js +1274 -1274
- package/node_modules/lmdb-store/index.mjs +3 -3
- package/node_modules/lmdb-store/package.json +16 -11
- package/node_modules/lmdb-store/prebuilds/darwin-arm64/electron.abi98.node +0 -0
- package/node_modules/lmdb-store/prebuilds/darwin-arm64/node.abi83.node +0 -0
- package/node_modules/lmdb-store/prebuilds/darwin-arm64/node.abi93.node +0 -0
- package/node_modules/lmdb-store/prebuilds/darwin-x64/electron.abi98.node +0 -0
- package/node_modules/lmdb-store/prebuilds/darwin-x64/node.abi83.node +0 -0
- package/node_modules/lmdb-store/prebuilds/darwin-x64/node.abi93.node +0 -0
- package/node_modules/lmdb-store/prebuilds/linux-arm64/electron.abi98.node +0 -0
- package/node_modules/lmdb-store/prebuilds/linux-arm64/node.abi83.node +0 -0
- package/node_modules/lmdb-store/prebuilds/linux-arm64/node.abi93.node +0 -0
- package/node_modules/lmdb-store/prebuilds/linux-x64/electron.abi98.node +0 -0
- package/node_modules/lmdb-store/prebuilds/linux-x64/node.abi83.musl.node +0 -0
- package/node_modules/lmdb-store/prebuilds/linux-x64/node.abi83.node +0 -0
- package/node_modules/lmdb-store/prebuilds/linux-x64/node.abi93.musl.node +0 -0
- package/node_modules/lmdb-store/prebuilds/linux-x64/node.abi93.node +0 -0
- package/node_modules/lmdb-store/prebuilds/win32-x64/electron.abi98.node +0 -0
- package/node_modules/lmdb-store/prebuilds/win32-x64/node.abi83.node +0 -0
- package/node_modules/lmdb-store/prebuilds/win32-x64/node.abi93.node +0 -0
- package/node_modules/lmdb-store/src/compression.cpp +181 -181
- package/node_modules/lmdb-store/src/cursor.cpp +407 -407
- package/node_modules/lmdb-store/src/dbi.cpp +354 -354
- package/node_modules/lmdb-store/src/env.cpp +1134 -1134
- package/node_modules/lmdb-store/src/misc.cpp +528 -528
- package/node_modules/lmdb-store/src/node-lmdb.cpp +44 -44
- package/node_modules/lmdb-store/src/node-lmdb.h +965 -965
- package/node_modules/lmdb-store/src/ordered-binary.cpp +337 -337
- package/node_modules/lmdb-store/src/txn.cpp +513 -513
- package/node_modules/lmdb-store/src/v8-fast-api-calls.h +419 -419
- package/node_modules/lmdb-store/src/windows.c +30 -30
- package/node_modules/lmdb-store/test/index.test.js +584 -584
- package/node_modules/lmdb-store/test/node-lmdb.test.js +1525 -1525
- package/node_modules/lmdb-store/test/threads.js +100 -100
- package/node_modules/lmdb-store/util/ArrayLikeIterable.js +136 -136
- package/node_modules/lmdb-store/util/WeakValueMap.js +40 -40
- package/node_modules/lmdb-store/util/upgrade-lmdb.js +46 -46
- package/node_modules/lmdb-store/util/when.js +8 -8
- package/node_modules/microtime/.github/workflows/release.yml +76 -0
- package/node_modules/microtime/.github/workflows/test.yml +46 -0
- package/node_modules/microtime/README.md +0 -2
- package/node_modules/microtime/binding.gyp +28 -10
- package/node_modules/microtime/package.json +25 -20
- package/node_modules/microtime/prebuilds/darwin-x64+arm64/electron.napi.node +0 -0
- package/node_modules/microtime/prebuilds/darwin-x64+arm64/node.napi.node +0 -0
- package/node_modules/microtime/prebuilds/linux-arm/node.napi.armv7.node +0 -0
- package/node_modules/microtime/prebuilds/linux-arm64/node.napi.armv8.node +0 -0
- package/node_modules/microtime/prebuilds/linux-x64/electron.napi.node +0 -0
- package/node_modules/microtime/prebuilds/linux-x64/node.napi.node +0 -0
- package/node_modules/microtime/prebuilds/win32-ia32/electron.napi.node +0 -0
- package/node_modules/microtime/prebuilds/win32-ia32/node.napi.node +0 -0
- package/node_modules/microtime/prebuilds/win32-x64/electron.napi.node +0 -0
- package/node_modules/microtime/prebuilds/win32-x64/node.napi.node +0 -0
- package/node_modules/msgpackr/dist/index.js +1929 -1917
- package/node_modules/msgpackr/dist/index.min.js +67 -68
- package/node_modules/msgpackr/dist/node.cjs +1994 -1980
- package/node_modules/msgpackr/dist/test.js +683 -1235
- package/node_modules/msgpackr/index.d.ts +23 -12
- package/node_modules/msgpackr/node-index.js +23 -21
- package/node_modules/msgpackr/pack.js +935 -931
- package/node_modules/msgpackr/package.json +24 -12
- package/node_modules/msgpackr/unpack.d.ts +52 -50
- package/node_modules/msgpackr/unpack.js +1061 -1053
- package/node_modules/msgpackr-extract/bin/download-prebuilds.js +11 -0
- package/node_modules/msgpackr-extract/binding.gyp +22 -5
- package/node_modules/msgpackr-extract/index.js +1 -1
- package/node_modules/msgpackr-extract/package.json +46 -21
- package/node_modules/msgpackr-extract/src/.vs/ProjectSettings.json +3 -0
- package/node_modules/msgpackr-extract/src/.vs/VSWorkspaceState.json +7 -0
- package/node_modules/msgpackr-extract/src/.vs/slnx.sqlite +0 -0
- package/node_modules/msgpackr-extract/src/.vs/src/v16/.suo +0 -0
- package/node_modules/msgpackr-extract/src/.vs/src/v16/Browse.VC.db +0 -0
- package/node_modules/msgpackr-extract/{prebuilds/darwin-x64/node.abi72.node → src/.vs/src/v16/Browse.VC.db-shm} +0 -0
- package/node_modules/msgpackr-extract/src/.vs/src/v16/Browse.VC.db-wal +0 -0
- package/node_modules/msgpackr-extract/src/extract.cpp +272 -269
- package/node_modules/nan/package.json +0 -1
- package/node_modules/node-addon-api/README.md +146 -53
- package/node_modules/node-addon-api/common.gypi +21 -0
- package/node_modules/node-addon-api/except.gypi +25 -0
- package/node_modules/node-addon-api/index.js +7 -41
- package/node_modules/node-addon-api/napi-inl.deprecated.h +8 -8
- package/node_modules/node-addon-api/napi-inl.h +2795 -633
- package/node_modules/node-addon-api/napi.h +1547 -597
- package/node_modules/node-addon-api/node_api.gyp +9 -0
- package/node_modules/node-addon-api/noexcept.gypi +26 -0
- package/node_modules/node-addon-api/nothing.c +0 -0
- package/node_modules/node-addon-api/package-support.json +21 -0
- package/node_modules/node-addon-api/package.json +203 -13
- package/node_modules/node-addon-api/tools/README.md +12 -6
- package/node_modules/node-addon-api/tools/clang-format.js +71 -0
- package/node_modules/node-addon-api/tools/conversion.js +4 -8
- package/node_modules/node-addon-api/tools/eslint-format.js +71 -0
- package/node_modules/node-gyp-build/README.md +17 -14
- package/node_modules/node-gyp-build/bin.js +28 -15
- package/node_modules/node-gyp-build/index.js +145 -34
- package/node_modules/node-gyp-build/package.json +18 -15
- package/node_modules/{lmdb-store/node_modules/node-gyp-build → node-gyp-build-optional-packages}/LICENSE +0 -0
- package/node_modules/{lmdb-store/node_modules/node-gyp-build → node-gyp-build-optional-packages}/README.md +0 -0
- package/node_modules/{lmdb-store/node_modules/node-gyp-build → node-gyp-build-optional-packages}/bin.js +1 -1
- package/node_modules/{lmdb-store/node_modules/node-gyp-build → node-gyp-build-optional-packages}/build-test.js +0 -0
- package/node_modules/{lmdb-store/node_modules/node-gyp-build → node-gyp-build-optional-packages}/index.js +17 -11
- package/node_modules/{lmdb-store/node_modules/node-gyp-build → node-gyp-build-optional-packages}/optional.js +0 -0
- package/node_modules/{msgpackr-extract/node_modules/node-gyp-build → node-gyp-build-optional-packages}/package.json +17 -17
- package/package.json +12 -11
- package/security/JWTObjects.jsc +0 -0
- package/security/auth.jsc +0 -0
- package/security/cryptoHash.jsc +0 -0
- package/security/data_objects/PermissionAttributeResponseObject.jsc +0 -0
- package/security/data_objects/PermissionResponseObject.jsc +0 -0
- package/security/data_objects/PermissionTableResponseObject.jsc +0 -0
- package/security/permissionsTranslator.jsc +0 -0
- package/security/role.jsc +0 -0
- package/security/tokenAuthentication.jsc +0 -0
- package/security/user.jsc +0 -0
- package/server/ClusteringOriginObject.jsc +0 -0
- package/server/JobObject.jsc +0 -0
- package/server/clustering/ClusterStatusObject.jsc +0 -0
- package/server/clustering/NodeObject.jsc +0 -0
- package/server/clustering/clusterUtilities.jsc +0 -0
- package/server/configuration.jsc +0 -0
- package/server/customFunctions/customFunctionsServer.jsc +0 -0
- package/server/customFunctions/helpers/getCORSOptions.jsc +0 -0
- package/server/customFunctions/helpers/getHeaderTimeoutConfig.jsc +0 -0
- package/server/customFunctions/helpers/getServerOptions.jsc +0 -0
- package/server/customFunctions/operations.jsc +0 -0
- package/server/customFunctions/operationsValidation.jsc +0 -0
- package/server/harperdb/hdbServer.jsc +0 -0
- package/server/ipc/IPCClient.jsc +0 -0
- package/server/ipc/hdbIpcServer.jsc +0 -0
- package/server/ipc/serverHandlers.jsc +0 -0
- package/server/ipc/utility/IPCEventObject.jsc +0 -0
- package/server/ipc/utility/ipcUtils.jsc +0 -0
- package/server/jobRunner.jsc +0 -0
- package/server/jobThread.jsc +0 -0
- package/server/jobs.jsc +0 -0
- package/server/serverHelpers/OperationFunctionObject.jsc +0 -0
- package/server/serverHelpers/requestTimePlugin.jsc +0 -0
- package/server/serverHelpers/serverHandlers.jsc +0 -0
- package/server/serverHelpers/serverUtilities.jsc +0 -0
- package/server/socketcluster/Server.jsc +0 -0
- package/server/socketcluster/broker.jsc +0 -0
- package/server/socketcluster/connector/HDBSocketConnector.jsc +0 -0
- package/server/socketcluster/connector/InterNodeSocketConnector.jsc +0 -0
- package/server/socketcluster/connector/SocketConnector.jsc +0 -0
- package/server/socketcluster/connector/spawnSCConnection.jsc +0 -0
- package/server/socketcluster/decisionMatrix/CoreDecisionMatrix.jsc +0 -0
- package/server/socketcluster/decisionMatrix/DecisionMatrixIF.jsc +0 -0
- package/server/socketcluster/decisionMatrix/rules/AssignToHdbChildWorkerRule.jsc +0 -0
- package/server/socketcluster/decisionMatrix/rules/CallRoomMsgHandlerRule.jsc +0 -0
- package/server/socketcluster/decisionMatrix/rules/CleanDataObjectRule.jsc +0 -0
- package/server/socketcluster/decisionMatrix/rules/CommandCollection.jsc +0 -0
- package/server/socketcluster/decisionMatrix/rules/DummyRule.jsc +0 -0
- package/server/socketcluster/decisionMatrix/rules/RulesIF.jsc +0 -0
- package/server/socketcluster/decisionMatrix/rules/StripHdbHeaderRule.jsc +0 -0
- package/server/socketcluster/decisionMatrix/rules/TestRule.jsc +0 -0
- package/server/socketcluster/handlers/NodeConnectionsHandler.jsc +0 -0
- package/server/socketcluster/handlers/SCServer.jsc +0 -0
- package/server/socketcluster/handlers/ServerSocket.jsc +0 -0
- package/server/socketcluster/interNodeConnectionLauncher.jsc +0 -0
- package/server/socketcluster/messageQueue/MessageQueueIF.jsc +0 -0
- package/server/socketcluster/middleware/AuthMiddleware.jsc +0 -0
- package/server/socketcluster/middleware/ConnectionNameCheckMiddleware.jsc +0 -0
- package/server/socketcluster/middleware/GenericMiddleware.jsc +0 -0
- package/server/socketcluster/middleware/MessagePrepMiddleware.jsc +0 -0
- package/server/socketcluster/middleware/MiddlewareFactory.jsc +0 -0
- package/server/socketcluster/middleware/MiddlewareIF.jsc +0 -0
- package/server/socketcluster/middleware/OriginatorCheckMiddleware.jsc +0 -0
- package/server/socketcluster/middleware/RequestDataValidMiddleware.jsc +0 -0
- package/server/socketcluster/middleware/StampOriginatorMiddleware.jsc +0 -0
- package/server/socketcluster/middleware/StampRequestMiddleware.jsc +0 -0
- package/server/socketcluster/observer/EventableIF.jsc +0 -0
- package/server/socketcluster/room/AddUserRoom.jsc +0 -0
- package/server/socketcluster/room/AlterUserRoom.jsc +0 -0
- package/server/socketcluster/room/CoreRoom.jsc +0 -0
- package/server/socketcluster/room/CreateAttributeRoom.jsc +0 -0
- package/server/socketcluster/room/CreateSchemaRoom.jsc +0 -0
- package/server/socketcluster/room/CreateTableRoom.jsc +0 -0
- package/server/socketcluster/room/DropUserRoom.jsc +0 -0
- package/server/socketcluster/room/HDBNodeRoom.jsc +0 -0
- package/server/socketcluster/room/RoomIF.jsc +0 -0
- package/server/socketcluster/room/RoomMessageObjects.jsc +0 -0
- package/server/socketcluster/room/UsersRoom.jsc +0 -0
- package/server/socketcluster/room/WatchHDBWorkersRoom.jsc +0 -0
- package/server/socketcluster/room/WorkerRoom.jsc +0 -0
- package/server/socketcluster/room/roomFactory.jsc +0 -0
- package/server/socketcluster/socketClusterObjects.jsc +0 -0
- package/server/socketcluster/types.jsc +0 -0
- package/server/socketcluster/util/clusterData.jsc +0 -0
- package/server/socketcluster/util/socketClusterUtils.jsc +0 -0
- package/server/socketcluster/worker/ClusterWorker.jsc +0 -0
- package/server/socketcluster/worker/WorkerIF.jsc +0 -0
- package/server/socketcluster/worker/WorkerObjects.jsc +0 -0
- package/server/transactToClusteringUtilities.jsc +0 -0
- package/sqlTranslator/SelectValidator.jsc +0 -0
- package/sqlTranslator/alasqlFunctionImporter.jsc +0 -0
- package/sqlTranslator/conditionPatterns.jsc +0 -0
- package/sqlTranslator/deleteTranslator.jsc +0 -0
- package/sqlTranslator/index.jsc +0 -0
- package/sqlTranslator/sql_statement_bucket.jsc +0 -0
- package/upgrade/EnvironmentVariable.jsc +0 -0
- package/upgrade/UpgradeDirective.jsc +0 -0
- package/upgrade/UpgradeObjects.jsc +0 -0
- package/upgrade/directives/3-0-0.jsc +0 -0
- package/upgrade/directives/3-1-0.jsc +0 -0
- package/upgrade/directives/directivesController.jsc +0 -0
- package/upgrade/directives/upgrade_scripts/3_0_0_reindex_script.jsc +0 -0
- package/upgrade/directivesManager.jsc +0 -0
- package/upgrade/lmdb/nodeLMDB/DBIDefinition.jsc +0 -0
- package/upgrade/lmdb/nodeLMDB/OpenDBIObject.jsc +0 -0
- package/upgrade/lmdb/nodeLMDB/OpenEnvironmentObject.jsc +0 -0
- package/upgrade/lmdb/nodeLMDB/commonErrors.jsc +0 -0
- package/upgrade/lmdb/nodeLMDB/commonUtility.jsc +0 -0
- package/upgrade/lmdb/nodeLMDB/environmentUtility.jsc +0 -0
- package/upgrade/lmdb/nodeLMDB/terms.jsc +0 -0
- package/upgrade/upgradePrompt.jsc +0 -0
- package/upgrade/upgradeUtilities.jsc +0 -0
- package/utility/AWS/AWSConnector.jsc +0 -0
- package/utility/OperationFunctionCaller.jsc +0 -0
- package/utility/common_utils.jsc +0 -0
- package/utility/environment/SystemInformationObject.jsc +0 -0
- package/utility/environment/SystemInformationOperation.jsc +0 -0
- package/utility/environment/environmentManager.jsc +0 -0
- package/utility/environment/systemInformation.jsc +0 -0
- package/utility/errors/commonErrors.jsc +0 -0
- package/utility/errors/hdbError.jsc +0 -0
- package/utility/functions/date/dateFunctions.jsc +0 -0
- package/utility/functions/geo.jsc +0 -0
- package/utility/functions/math/avg.jsc +0 -0
- package/utility/functions/math/count.jsc +0 -0
- package/utility/functions/sql/alaSQLExtension.jsc +0 -0
- package/utility/functions/string/compare.jsc +0 -0
- package/utility/globalSchema.jsc +0 -0
- package/utility/hdbTerms.jsc +0 -0
- package/utility/install/checkJWTTokensExist.jsc +0 -0
- package/utility/install/installer.jsc +0 -0
- package/utility/install_user_permission.jsc +0 -0
- package/utility/lmdb/DBIDefinition.jsc +0 -0
- package/utility/lmdb/DeleteRecordsResponseObject.jsc +0 -0
- package/utility/lmdb/InsertRecordsResponseObject.jsc +0 -0
- package/utility/lmdb/OpenDBIObject.jsc +0 -0
- package/utility/lmdb/OpenEnvironmentObject.jsc +0 -0
- package/utility/lmdb/UpdateRecordsResponseObject.jsc +0 -0
- package/utility/lmdb/UpsertRecordsResponseObject.jsc +0 -0
- package/utility/lmdb/cleanLMDBMap.jsc +0 -0
- package/utility/lmdb/commonUtility.jsc +0 -0
- package/utility/lmdb/deleteUtility.jsc +0 -0
- package/utility/lmdb/environmentUtility.jsc +0 -0
- package/utility/lmdb/searchCursorFunctions.jsc +0 -0
- package/utility/lmdb/searchUtility.jsc +0 -0
- package/utility/lmdb/terms.jsc +0 -0
- package/utility/lmdb/writeUtility.jsc +0 -0
- package/utility/logging/harper_logger.jsc +0 -0
- package/utility/mount_hdb.jsc +0 -0
- package/utility/npmUtilities.jsc +0 -0
- package/utility/operation_authorization.jsc +0 -0
- package/utility/password.jsc +0 -0
- package/utility/pm2/servicesConfig.jsc +0 -0
- package/utility/pm2/utilityFunctions.jsc +0 -0
- package/utility/psList.jsc +0 -0
- package/utility/registration/hdb_license.jsc +0 -0
- package/utility/registration/licenseObjects.jsc +0 -0
- package/utility/registration/registrationHandler.jsc +0 -0
- package/utility/scripts/restartHdb.jsc +0 -0
- package/utility/signalling.jsc +0 -0
- package/utility/system_info.jsc +0 -0
- package/validation/bulkDeleteValidator.jsc +0 -0
- package/validation/check_permissions.jsc +0 -0
- package/validation/clustering/configureValidator.jsc +0 -0
- package/validation/common_validators.jsc +0 -0
- package/validation/conditionalDeleteValidator.jsc +0 -0
- package/validation/deleteValidator.jsc +0 -0
- package/validation/fileLoadValidator.jsc +0 -0
- package/validation/insertValidator.jsc +0 -0
- package/validation/nodeSubscriptionValidator.jsc +0 -0
- package/validation/nodeValidator.jsc +0 -0
- package/validation/readLogValidator.jsc +0 -0
- package/validation/registration/license_key_object.jsc +0 -0
- package/validation/role_validation.jsc +0 -0
- package/validation/schemaMetadataValidator.jsc +0 -0
- package/validation/schema_validator.jsc +0 -0
- package/validation/searchValidator.jsc +0 -0
- package/validation/user_validation.jsc +0 -0
- package/validation/validationWrapper.jsc +0 -0
- package/node_modules/lmdb-store/build/Makefile +0 -324
- package/node_modules/lmdb-store/build/Release/.deps/Release/lmdb-store.node.d +0 -1
- package/node_modules/lmdb-store/build/Release/.deps/Release/obj.target/lmdb-store/dependencies/lmdb/libraries/liblmdb/chacha8.o.d +0 -6
- package/node_modules/lmdb-store/build/Release/.deps/Release/obj.target/lmdb-store/dependencies/lmdb/libraries/liblmdb/mdb.o.d +0 -8
- package/node_modules/lmdb-store/build/Release/.deps/Release/obj.target/lmdb-store/dependencies/lmdb/libraries/liblmdb/midl.o.d +0 -8
- package/node_modules/lmdb-store/build/Release/.deps/Release/obj.target/lmdb-store/dependencies/lz4/lib/lz4.o.d +0 -5
- package/node_modules/lmdb-store/build/Release/.deps/Release/obj.target/lmdb-store/src/compression.o.d +0 -72
- package/node_modules/lmdb-store/build/Release/.deps/Release/obj.target/lmdb-store/src/cursor.o.d +0 -73
- package/node_modules/lmdb-store/build/Release/.deps/Release/obj.target/lmdb-store/src/dbi.o.d +0 -73
- package/node_modules/lmdb-store/build/Release/.deps/Release/obj.target/lmdb-store/src/env.o.d +0 -73
- package/node_modules/lmdb-store/build/Release/.deps/Release/obj.target/lmdb-store/src/misc.o.d +0 -73
- package/node_modules/lmdb-store/build/Release/.deps/Release/obj.target/lmdb-store/src/node-lmdb.o.d +0 -73
- package/node_modules/lmdb-store/build/Release/.deps/Release/obj.target/lmdb-store/src/ordered-binary.o.d +0 -73
- package/node_modules/lmdb-store/build/Release/.deps/Release/obj.target/lmdb-store/src/txn.o.d +0 -73
- package/node_modules/lmdb-store/build/Release/.deps/Release/obj.target/lmdb-store/src/windows.o.d +0 -3
- package/node_modules/lmdb-store/build/Release/.deps/Release/obj.target/lmdb-store.node.d +0 -1
- package/node_modules/lmdb-store/build/Release/lmdb-store.node +0 -0
- package/node_modules/lmdb-store/build/Release/obj.target/lmdb-store/dependencies/lmdb/libraries/liblmdb/chacha8.o +0 -0
- package/node_modules/lmdb-store/build/Release/obj.target/lmdb-store/dependencies/lmdb/libraries/liblmdb/mdb.o +0 -0
- package/node_modules/lmdb-store/build/Release/obj.target/lmdb-store/dependencies/lmdb/libraries/liblmdb/midl.o +0 -0
- package/node_modules/lmdb-store/build/Release/obj.target/lmdb-store/dependencies/lz4/lib/lz4.o +0 -0
- package/node_modules/lmdb-store/build/Release/obj.target/lmdb-store/src/compression.o +0 -0
- package/node_modules/lmdb-store/build/Release/obj.target/lmdb-store/src/cursor.o +0 -0
- package/node_modules/lmdb-store/build/Release/obj.target/lmdb-store/src/dbi.o +0 -0
- package/node_modules/lmdb-store/build/Release/obj.target/lmdb-store/src/env.o +0 -0
- package/node_modules/lmdb-store/build/Release/obj.target/lmdb-store/src/misc.o +0 -0
- package/node_modules/lmdb-store/build/Release/obj.target/lmdb-store/src/node-lmdb.o +0 -0
- package/node_modules/lmdb-store/build/Release/obj.target/lmdb-store/src/ordered-binary.o +0 -0
- package/node_modules/lmdb-store/build/Release/obj.target/lmdb-store/src/txn.o +0 -0
- package/node_modules/lmdb-store/build/Release/obj.target/lmdb-store/src/windows.o +0 -0
- package/node_modules/lmdb-store/build/Release/obj.target/lmdb-store.node +0 -0
- package/node_modules/lmdb-store/build/binding.Makefile +0 -6
- package/node_modules/lmdb-store/build/config.gypi +0 -426
- package/node_modules/lmdb-store/build/lmdb-store.target.mk +0 -206
- package/node_modules/lmdb-store/node_modules/node-gyp-build/package.json +0 -60
- package/node_modules/lmdb-store/prebuilds/darwin-x64/electron.abi87.node +0 -0
- package/node_modules/lmdb-store/prebuilds/darwin-x64/node.abi72.node +0 -0
- package/node_modules/lmdb-store/prebuilds/darwin-x64/node.abi88.node +0 -0
- package/node_modules/lmdb-store/prebuilds/win32-x64/electron.abi87.node +0 -0
- package/node_modules/lmdb-store/prebuilds/win32-x64/node.abi72.node +0 -0
- package/node_modules/lmdb-store/prebuilds/win32-x64/node.abi88.node +0 -0
- package/node_modules/microtime/prebuilds/darwin-x64/electron-napi.node +0 -0
- package/node_modules/microtime/prebuilds/darwin-x64/node-napi.node +0 -0
- package/node_modules/microtime/prebuilds/linux-arm/electron-napi.node +0 -0
- package/node_modules/microtime/prebuilds/linux-arm/node-napi.node +0 -0
- package/node_modules/microtime/prebuilds/linux-x64/electron-napi.node +0 -0
- package/node_modules/microtime/prebuilds/linux-x64/node-napi.node +0 -0
- package/node_modules/microtime/prebuilds/win32-x64/electron-napi.node +0 -0
- package/node_modules/microtime/prebuilds/win32-x64/node-napi.node +0 -0
- package/node_modules/msgpackr-extract/.circleci/config.yml +0 -19
- package/node_modules/msgpackr-extract/.travis.yml +0 -30
- package/node_modules/msgpackr-extract/node_modules/node-gyp-build/LICENSE +0 -21
- package/node_modules/msgpackr-extract/node_modules/node-gyp-build/README.md +0 -58
- package/node_modules/msgpackr-extract/node_modules/node-gyp-build/bin.js +0 -77
- package/node_modules/msgpackr-extract/node_modules/node-gyp-build/build-test.js +0 -19
- package/node_modules/msgpackr-extract/node_modules/node-gyp-build/index.js +0 -202
- package/node_modules/msgpackr-extract/node_modules/node-gyp-build/optional.js +0 -7
- package/node_modules/msgpackr-extract/prebuilds/darwin-arm64/electron.abi98.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/darwin-arm64/node.abi102.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/darwin-arm64/node.abi83.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/darwin-arm64/node.abi93.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/darwin-x64/electron.abi98.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/darwin-x64/node.abi102.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/darwin-x64/node.abi83.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/darwin-x64/node.abi88.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/darwin-x64/node.abi93.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/linux-arm64/electron.abi98.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/linux-arm64/node.abi102.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/linux-arm64/node.abi83.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/linux-arm64/node.abi93.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/linux-x64/electron.abi98.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/linux-x64/node.abi102.musl.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/linux-x64/node.abi102.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/linux-x64/node.abi72.musl.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/linux-x64/node.abi72.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/linux-x64/node.abi83.musl.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/linux-x64/node.abi83.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/linux-x64/node.abi88.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/linux-x64/node.abi93.musl.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/linux-x64/node.abi93.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/win32-x64/electron.abi98.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/win32-x64/node.abi102.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/win32-x64/node.abi72.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/win32-x64/node.abi83.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/win32-x64/node.abi88.node +0 -0
- package/node_modules/msgpackr-extract/prebuilds/win32-x64/node.abi93.node +0 -0
- package/node_modules/node-addon-api/.editorconfig +0 -8
- package/node_modules/node-addon-api/.travis.yml +0 -65
- package/node_modules/node-addon-api/CHANGELOG.md +0 -325
- package/node_modules/node-addon-api/CODE_OF_CONDUCT.md +0 -4
- package/node_modules/node-addon-api/CONTRIBUTING.md +0 -66
- package/node_modules/node-addon-api/appveyor.yml +0 -48
- package/node_modules/node-addon-api/doc/Doxyfile +0 -2450
- package/node_modules/node-addon-api/doc/array_buffer.md +0 -129
- package/node_modules/node-addon-api/doc/async_context.md +0 -76
- package/node_modules/node-addon-api/doc/async_operations.md +0 -31
- package/node_modules/node-addon-api/doc/async_worker.md +0 -397
- package/node_modules/node-addon-api/doc/basic_types.md +0 -415
- package/node_modules/node-addon-api/doc/bigint.md +0 -92
- package/node_modules/node-addon-api/doc/boolean.md +0 -64
- package/node_modules/node-addon-api/doc/buffer.md +0 -140
- package/node_modules/node-addon-api/doc/callback_scope.md +0 -54
- package/node_modules/node-addon-api/doc/callbackinfo.md +0 -97
- package/node_modules/node-addon-api/doc/checker-tool.md +0 -32
- package/node_modules/node-addon-api/doc/class_property_descriptor.md +0 -118
- package/node_modules/node-addon-api/doc/cmake-js.md +0 -19
- package/node_modules/node-addon-api/doc/conversion-tool.md +0 -28
- package/node_modules/node-addon-api/doc/creating_a_release.md +0 -62
- package/node_modules/node-addon-api/doc/dataview.md +0 -244
- package/node_modules/node-addon-api/doc/env.md +0 -63
- package/node_modules/node-addon-api/doc/error.md +0 -115
- package/node_modules/node-addon-api/doc/error_handling.md +0 -186
- package/node_modules/node-addon-api/doc/escapable_handle_scope.md +0 -82
- package/node_modules/node-addon-api/doc/external.md +0 -59
- package/node_modules/node-addon-api/doc/function.md +0 -294
- package/node_modules/node-addon-api/doc/function_reference.md +0 -238
- package/node_modules/node-addon-api/doc/generator.md +0 -13
- package/node_modules/node-addon-api/doc/handle_scope.md +0 -65
- package/node_modules/node-addon-api/doc/memory_management.md +0 -27
- package/node_modules/node-addon-api/doc/node-gyp.md +0 -82
- package/node_modules/node-addon-api/doc/number.md +0 -163
- package/node_modules/node-addon-api/doc/object.md +0 -202
- package/node_modules/node-addon-api/doc/object_lifetime_management.md +0 -83
- package/node_modules/node-addon-api/doc/object_reference.md +0 -117
- package/node_modules/node-addon-api/doc/object_wrap.md +0 -546
- package/node_modules/node-addon-api/doc/prebuild_tools.md +0 -16
- package/node_modules/node-addon-api/doc/promises.md +0 -74
- package/node_modules/node-addon-api/doc/property_descriptor.md +0 -231
- package/node_modules/node-addon-api/doc/range_error.md +0 -59
- package/node_modules/node-addon-api/doc/reference.md +0 -111
- package/node_modules/node-addon-api/doc/setup.md +0 -82
- package/node_modules/node-addon-api/doc/string.md +0 -89
- package/node_modules/node-addon-api/doc/symbol.md +0 -44
- package/node_modules/node-addon-api/doc/threadsafe_function.md +0 -303
- package/node_modules/node-addon-api/doc/type_error.md +0 -59
- package/node_modules/node-addon-api/doc/typed_array.md +0 -74
- package/node_modules/node-addon-api/doc/typed_array_of.md +0 -133
- package/node_modules/node-addon-api/doc/value.md +0 -269
- package/node_modules/node-addon-api/doc/version_management.md +0 -43
- package/node_modules/node-addon-api/doc/working_with_javascript_values.md +0 -14
- package/node_modules/node-addon-api/external-napi/node_api.h +0 -7
- package/node_modules/node-addon-api/src/node_api.cc +0 -3655
- package/node_modules/node-addon-api/src/node_api.gyp +0 -21
- package/node_modules/node-addon-api/src/node_api.h +0 -588
- package/node_modules/node-addon-api/src/node_api_types.h +0 -115
- package/node_modules/node-addon-api/src/node_internals.cc +0 -142
- package/node_modules/node-addon-api/src/node_internals.h +0 -157
- package/node_modules/node-addon-api/src/util-inl.h +0 -38
- package/node_modules/node-addon-api/src/util.h +0 -7
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
The OpenLDAP Public License
|
|
2
|
-
Version 2.8, 17 August 2003
|
|
3
|
-
|
|
4
|
-
Redistribution and use of this software and associated documentation
|
|
5
|
-
("Software"), with or without modification, are permitted provided
|
|
6
|
-
that the following conditions are met:
|
|
7
|
-
|
|
8
|
-
1. Redistributions in source form must retain copyright statements
|
|
9
|
-
and notices,
|
|
10
|
-
|
|
11
|
-
2. Redistributions in binary form must reproduce applicable copyright
|
|
12
|
-
statements and notices, this list of conditions, and the following
|
|
13
|
-
disclaimer in the documentation and/or other materials provided
|
|
14
|
-
with the distribution, and
|
|
15
|
-
|
|
16
|
-
3. Redistributions must contain a verbatim copy of this document.
|
|
17
|
-
|
|
18
|
-
The OpenLDAP Foundation may revise this license from time to time.
|
|
19
|
-
Each revision is distinguished by a version number. You may use
|
|
20
|
-
this Software under terms of this license revision or under the
|
|
21
|
-
terms of any subsequent revision of the license.
|
|
22
|
-
|
|
23
|
-
THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS
|
|
24
|
-
CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
|
25
|
-
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
26
|
-
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
|
27
|
-
SHALL THE OPENLDAP FOUNDATION, ITS CONTRIBUTORS, OR THE AUTHOR(S)
|
|
28
|
-
OR OWNER(S) OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
29
|
-
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
30
|
-
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
31
|
-
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
32
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
33
|
-
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
34
|
-
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
35
|
-
POSSIBILITY OF SUCH DAMAGE.
|
|
36
|
-
|
|
37
|
-
The names of the authors and copyright holders must not be used in
|
|
38
|
-
advertising or otherwise to promote the sale, use or other dealing
|
|
39
|
-
in this Software without specific, written prior permission. Title
|
|
40
|
-
to copyright in this Software shall at all times remain with copyright
|
|
41
|
-
holders.
|
|
42
|
-
|
|
43
|
-
OpenLDAP is a registered trademark of the OpenLDAP Foundation.
|
|
44
|
-
|
|
45
|
-
Copyright 1999-2003 The OpenLDAP Foundation, Redwood City,
|
|
46
|
-
California, USA. All Rights Reserved. Permission to copy and
|
|
47
|
-
distribute verbatim copies of this document is granted.
|
|
1
|
+
The OpenLDAP Public License
|
|
2
|
+
Version 2.8, 17 August 2003
|
|
3
|
+
|
|
4
|
+
Redistribution and use of this software and associated documentation
|
|
5
|
+
("Software"), with or without modification, are permitted provided
|
|
6
|
+
that the following conditions are met:
|
|
7
|
+
|
|
8
|
+
1. Redistributions in source form must retain copyright statements
|
|
9
|
+
and notices,
|
|
10
|
+
|
|
11
|
+
2. Redistributions in binary form must reproduce applicable copyright
|
|
12
|
+
statements and notices, this list of conditions, and the following
|
|
13
|
+
disclaimer in the documentation and/or other materials provided
|
|
14
|
+
with the distribution, and
|
|
15
|
+
|
|
16
|
+
3. Redistributions must contain a verbatim copy of this document.
|
|
17
|
+
|
|
18
|
+
The OpenLDAP Foundation may revise this license from time to time.
|
|
19
|
+
Each revision is distinguished by a version number. You may use
|
|
20
|
+
this Software under terms of this license revision or under the
|
|
21
|
+
terms of any subsequent revision of the license.
|
|
22
|
+
|
|
23
|
+
THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS
|
|
24
|
+
CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
|
25
|
+
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
26
|
+
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
|
|
27
|
+
SHALL THE OPENLDAP FOUNDATION, ITS CONTRIBUTORS, OR THE AUTHOR(S)
|
|
28
|
+
OR OWNER(S) OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
29
|
+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
|
30
|
+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
31
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
32
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
33
|
+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
|
34
|
+
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
35
|
+
POSSIBILITY OF SUCH DAMAGE.
|
|
36
|
+
|
|
37
|
+
The names of the authors and copyright holders must not be used in
|
|
38
|
+
advertising or otherwise to promote the sale, use or other dealing
|
|
39
|
+
in this Software without specific, written prior permission. Title
|
|
40
|
+
to copyright in this Software shall at all times remain with copyright
|
|
41
|
+
holders.
|
|
42
|
+
|
|
43
|
+
OpenLDAP is a registered trademark of the OpenLDAP Foundation.
|
|
44
|
+
|
|
45
|
+
Copyright 1999-2003 The OpenLDAP Foundation, Redwood City,
|
|
46
|
+
California, USA. All Rights Reserved. Permission to copy and
|
|
47
|
+
distribute verbatim copies of this document is granted.
|
|
@@ -1,183 +1,183 @@
|
|
|
1
|
-
/*
|
|
2
|
-
chacha-merged.c version 20080118
|
|
3
|
-
D. J. Bernstein
|
|
4
|
-
Public domain.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
#include <memory.h>
|
|
8
|
-
#include <stdio.h>
|
|
9
|
-
//#include <sys/param.h>
|
|
10
|
-
|
|
11
|
-
#include "chacha8.h"
|
|
12
|
-
#if 0
|
|
13
|
-
#include "common/int-util.h"
|
|
14
|
-
#include "warnings.h"
|
|
15
|
-
#endif
|
|
16
|
-
|
|
17
|
-
#if BYTE_ORDER == LITTLE_ENDIAN
|
|
18
|
-
#define SWAP32LE(x) (x)
|
|
19
|
-
#else
|
|
20
|
-
#define SWAP32LE(x) ((((uint32_t) (x) & 0x000000ff) << 24) | \
|
|
21
|
-
(((uint32_t) (x) & 0x0000ff00) << 8) | \
|
|
22
|
-
(((uint32_t) (x) & 0x00ff0000) >> 8) | \
|
|
23
|
-
(((uint32_t) (x) & 0xff000000) >> 24))
|
|
24
|
-
#endif
|
|
25
|
-
|
|
26
|
-
/*
|
|
27
|
-
* The following macros are used to obtain exact-width results.
|
|
28
|
-
*/
|
|
29
|
-
#define U8V(v) ((uint8_t)(v) & UINT8_C(0xFF))
|
|
30
|
-
#define U32V(v) ((uint32_t)(v) & UINT32_C(0xFFFFFFFF))
|
|
31
|
-
|
|
32
|
-
/*
|
|
33
|
-
* The following macros load words from an array of bytes with
|
|
34
|
-
* different types of endianness, and vice versa.
|
|
35
|
-
*/
|
|
36
|
-
#define U8TO32_LITTLE(p) SWAP32LE(((uint32_t*)(p))[0])
|
|
37
|
-
#define U32TO8_LITTLE(p, v) (((uint32_t*)(p))[0] = SWAP32LE(v))
|
|
38
|
-
|
|
39
|
-
#define ROTATE(v,c) (rol32(v,c))
|
|
40
|
-
#define XOR(v,w) ((v) ^ (w))
|
|
41
|
-
#define PLUS(v,w) (U32V((v) + (w)))
|
|
42
|
-
#define PLUSONE(v) (PLUS((v),1))
|
|
43
|
-
|
|
44
|
-
#define QUARTERROUND(a,b,c,d) \
|
|
45
|
-
a = PLUS(a,b); d = ROTATE(XOR(d,a),16); \
|
|
46
|
-
c = PLUS(c,d); b = ROTATE(XOR(b,c),12); \
|
|
47
|
-
a = PLUS(a,b); d = ROTATE(XOR(d,a), 8); \
|
|
48
|
-
c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);
|
|
49
|
-
|
|
50
|
-
static const char sigma[] = "expand 32-byte k";
|
|
51
|
-
|
|
52
|
-
static uint32_t rol32(uint32_t x, int r) {
|
|
53
|
-
return (x << (r & 31)) | (x >> (-r & 31));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
void chacha8(const void* data, size_t length, const uint8_t* key, const uint8_t* iv, char* cipher) {
|
|
57
|
-
uint32_t x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15;
|
|
58
|
-
uint32_t j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11, j12, j13, j14, j15;
|
|
59
|
-
char* ctarget = 0;
|
|
60
|
-
char tmp[64];
|
|
61
|
-
int i;
|
|
62
|
-
|
|
63
|
-
if (!length) return;
|
|
64
|
-
|
|
65
|
-
j0 = U8TO32_LITTLE(sigma + 0);
|
|
66
|
-
j1 = U8TO32_LITTLE(sigma + 4);
|
|
67
|
-
j2 = U8TO32_LITTLE(sigma + 8);
|
|
68
|
-
j3 = U8TO32_LITTLE(sigma + 12);
|
|
69
|
-
j4 = U8TO32_LITTLE(key + 0);
|
|
70
|
-
j5 = U8TO32_LITTLE(key + 4);
|
|
71
|
-
j6 = U8TO32_LITTLE(key + 8);
|
|
72
|
-
j7 = U8TO32_LITTLE(key + 12);
|
|
73
|
-
j8 = U8TO32_LITTLE(key + 16);
|
|
74
|
-
j9 = U8TO32_LITTLE(key + 20);
|
|
75
|
-
j10 = U8TO32_LITTLE(key + 24);
|
|
76
|
-
j11 = U8TO32_LITTLE(key + 28);
|
|
77
|
-
j12 = 0;
|
|
78
|
-
j13 = 0;
|
|
79
|
-
j14 = U8TO32_LITTLE(iv + 0);
|
|
80
|
-
j15 = U8TO32_LITTLE(iv + 4);
|
|
81
|
-
|
|
82
|
-
for (;;) {
|
|
83
|
-
if (length < 64) {
|
|
84
|
-
memcpy(tmp, data, length);
|
|
85
|
-
data = tmp;
|
|
86
|
-
ctarget = cipher;
|
|
87
|
-
cipher = tmp;
|
|
88
|
-
}
|
|
89
|
-
x0 = j0;
|
|
90
|
-
x1 = j1;
|
|
91
|
-
x2 = j2;
|
|
92
|
-
x3 = j3;
|
|
93
|
-
x4 = j4;
|
|
94
|
-
x5 = j5;
|
|
95
|
-
x6 = j6;
|
|
96
|
-
x7 = j7;
|
|
97
|
-
x8 = j8;
|
|
98
|
-
x9 = j9;
|
|
99
|
-
x10 = j10;
|
|
100
|
-
x11 = j11;
|
|
101
|
-
x12 = j12;
|
|
102
|
-
x13 = j13;
|
|
103
|
-
x14 = j14;
|
|
104
|
-
x15 = j15;
|
|
105
|
-
for (i = 8;i > 0;i -= 2) {
|
|
106
|
-
QUARTERROUND( x0, x4, x8,x12)
|
|
107
|
-
QUARTERROUND( x1, x5, x9,x13)
|
|
108
|
-
QUARTERROUND( x2, x6,x10,x14)
|
|
109
|
-
QUARTERROUND( x3, x7,x11,x15)
|
|
110
|
-
QUARTERROUND( x0, x5,x10,x15)
|
|
111
|
-
QUARTERROUND( x1, x6,x11,x12)
|
|
112
|
-
QUARTERROUND( x2, x7, x8,x13)
|
|
113
|
-
QUARTERROUND( x3, x4, x9,x14)
|
|
114
|
-
}
|
|
115
|
-
x0 = PLUS( x0, j0);
|
|
116
|
-
x1 = PLUS( x1, j1);
|
|
117
|
-
x2 = PLUS( x2, j2);
|
|
118
|
-
x3 = PLUS( x3, j3);
|
|
119
|
-
x4 = PLUS( x4, j4);
|
|
120
|
-
x5 = PLUS( x5, j5);
|
|
121
|
-
x6 = PLUS( x6, j6);
|
|
122
|
-
x7 = PLUS( x7, j7);
|
|
123
|
-
x8 = PLUS( x8, j8);
|
|
124
|
-
x9 = PLUS( x9, j9);
|
|
125
|
-
x10 = PLUS(x10,j10);
|
|
126
|
-
x11 = PLUS(x11,j11);
|
|
127
|
-
x12 = PLUS(x12,j12);
|
|
128
|
-
x13 = PLUS(x13,j13);
|
|
129
|
-
x14 = PLUS(x14,j14);
|
|
130
|
-
x15 = PLUS(x15,j15);
|
|
131
|
-
|
|
132
|
-
x0 = XOR( x0,U8TO32_LITTLE((uint8_t*)data + 0));
|
|
133
|
-
x1 = XOR( x1,U8TO32_LITTLE((uint8_t*)data + 4));
|
|
134
|
-
x2 = XOR( x2,U8TO32_LITTLE((uint8_t*)data + 8));
|
|
135
|
-
x3 = XOR( x3,U8TO32_LITTLE((uint8_t*)data + 12));
|
|
136
|
-
x4 = XOR( x4,U8TO32_LITTLE((uint8_t*)data + 16));
|
|
137
|
-
x5 = XOR( x5,U8TO32_LITTLE((uint8_t*)data + 20));
|
|
138
|
-
x6 = XOR( x6,U8TO32_LITTLE((uint8_t*)data + 24));
|
|
139
|
-
x7 = XOR( x7,U8TO32_LITTLE((uint8_t*)data + 28));
|
|
140
|
-
x8 = XOR( x8,U8TO32_LITTLE((uint8_t*)data + 32));
|
|
141
|
-
x9 = XOR( x9,U8TO32_LITTLE((uint8_t*)data + 36));
|
|
142
|
-
x10 = XOR(x10,U8TO32_LITTLE((uint8_t*)data + 40));
|
|
143
|
-
x11 = XOR(x11,U8TO32_LITTLE((uint8_t*)data + 44));
|
|
144
|
-
x12 = XOR(x12,U8TO32_LITTLE((uint8_t*)data + 48));
|
|
145
|
-
x13 = XOR(x13,U8TO32_LITTLE((uint8_t*)data + 52));
|
|
146
|
-
x14 = XOR(x14,U8TO32_LITTLE((uint8_t*)data + 56));
|
|
147
|
-
x15 = XOR(x15,U8TO32_LITTLE((uint8_t*)data + 60));
|
|
148
|
-
|
|
149
|
-
j12 = PLUSONE(j12);
|
|
150
|
-
if (!j12)
|
|
151
|
-
{
|
|
152
|
-
j13 = PLUSONE(j13);
|
|
153
|
-
/* stopping at 2^70 bytes per iv is user's responsibility */
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
U32TO8_LITTLE(cipher + 0,x0);
|
|
157
|
-
U32TO8_LITTLE(cipher + 4,x1);
|
|
158
|
-
U32TO8_LITTLE(cipher + 8,x2);
|
|
159
|
-
U32TO8_LITTLE(cipher + 12,x3);
|
|
160
|
-
U32TO8_LITTLE(cipher + 16,x4);
|
|
161
|
-
U32TO8_LITTLE(cipher + 20,x5);
|
|
162
|
-
U32TO8_LITTLE(cipher + 24,x6);
|
|
163
|
-
U32TO8_LITTLE(cipher + 28,x7);
|
|
164
|
-
U32TO8_LITTLE(cipher + 32,x8);
|
|
165
|
-
U32TO8_LITTLE(cipher + 36,x9);
|
|
166
|
-
U32TO8_LITTLE(cipher + 40,x10);
|
|
167
|
-
U32TO8_LITTLE(cipher + 44,x11);
|
|
168
|
-
U32TO8_LITTLE(cipher + 48,x12);
|
|
169
|
-
U32TO8_LITTLE(cipher + 52,x13);
|
|
170
|
-
U32TO8_LITTLE(cipher + 56,x14);
|
|
171
|
-
U32TO8_LITTLE(cipher + 60,x15);
|
|
172
|
-
|
|
173
|
-
if (length <= 64) {
|
|
174
|
-
if (length < 64) {
|
|
175
|
-
memcpy(ctarget, cipher, length);
|
|
176
|
-
}
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
length -= 64;
|
|
180
|
-
cipher += 64;
|
|
181
|
-
data = (uint8_t*)data + 64;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
chacha-merged.c version 20080118
|
|
3
|
+
D. J. Bernstein
|
|
4
|
+
Public domain.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
#include <memory.h>
|
|
8
|
+
#include <stdio.h>
|
|
9
|
+
//#include <sys/param.h>
|
|
10
|
+
|
|
11
|
+
#include "chacha8.h"
|
|
12
|
+
#if 0
|
|
13
|
+
#include "common/int-util.h"
|
|
14
|
+
#include "warnings.h"
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
#if BYTE_ORDER == LITTLE_ENDIAN
|
|
18
|
+
#define SWAP32LE(x) (x)
|
|
19
|
+
#else
|
|
20
|
+
#define SWAP32LE(x) ((((uint32_t) (x) & 0x000000ff) << 24) | \
|
|
21
|
+
(((uint32_t) (x) & 0x0000ff00) << 8) | \
|
|
22
|
+
(((uint32_t) (x) & 0x00ff0000) >> 8) | \
|
|
23
|
+
(((uint32_t) (x) & 0xff000000) >> 24))
|
|
24
|
+
#endif
|
|
25
|
+
|
|
26
|
+
/*
|
|
27
|
+
* The following macros are used to obtain exact-width results.
|
|
28
|
+
*/
|
|
29
|
+
#define U8V(v) ((uint8_t)(v) & UINT8_C(0xFF))
|
|
30
|
+
#define U32V(v) ((uint32_t)(v) & UINT32_C(0xFFFFFFFF))
|
|
31
|
+
|
|
32
|
+
/*
|
|
33
|
+
* The following macros load words from an array of bytes with
|
|
34
|
+
* different types of endianness, and vice versa.
|
|
35
|
+
*/
|
|
36
|
+
#define U8TO32_LITTLE(p) SWAP32LE(((uint32_t*)(p))[0])
|
|
37
|
+
#define U32TO8_LITTLE(p, v) (((uint32_t*)(p))[0] = SWAP32LE(v))
|
|
38
|
+
|
|
39
|
+
#define ROTATE(v,c) (rol32(v,c))
|
|
40
|
+
#define XOR(v,w) ((v) ^ (w))
|
|
41
|
+
#define PLUS(v,w) (U32V((v) + (w)))
|
|
42
|
+
#define PLUSONE(v) (PLUS((v),1))
|
|
43
|
+
|
|
44
|
+
#define QUARTERROUND(a,b,c,d) \
|
|
45
|
+
a = PLUS(a,b); d = ROTATE(XOR(d,a),16); \
|
|
46
|
+
c = PLUS(c,d); b = ROTATE(XOR(b,c),12); \
|
|
47
|
+
a = PLUS(a,b); d = ROTATE(XOR(d,a), 8); \
|
|
48
|
+
c = PLUS(c,d); b = ROTATE(XOR(b,c), 7);
|
|
49
|
+
|
|
50
|
+
static const char sigma[] = "expand 32-byte k";
|
|
51
|
+
|
|
52
|
+
static uint32_t rol32(uint32_t x, int r) {
|
|
53
|
+
return (x << (r & 31)) | (x >> (-r & 31));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
void chacha8(const void* data, size_t length, const uint8_t* key, const uint8_t* iv, char* cipher) {
|
|
57
|
+
uint32_t x0, x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15;
|
|
58
|
+
uint32_t j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11, j12, j13, j14, j15;
|
|
59
|
+
char* ctarget = 0;
|
|
60
|
+
char tmp[64];
|
|
61
|
+
int i;
|
|
62
|
+
|
|
63
|
+
if (!length) return;
|
|
64
|
+
|
|
65
|
+
j0 = U8TO32_LITTLE(sigma + 0);
|
|
66
|
+
j1 = U8TO32_LITTLE(sigma + 4);
|
|
67
|
+
j2 = U8TO32_LITTLE(sigma + 8);
|
|
68
|
+
j3 = U8TO32_LITTLE(sigma + 12);
|
|
69
|
+
j4 = U8TO32_LITTLE(key + 0);
|
|
70
|
+
j5 = U8TO32_LITTLE(key + 4);
|
|
71
|
+
j6 = U8TO32_LITTLE(key + 8);
|
|
72
|
+
j7 = U8TO32_LITTLE(key + 12);
|
|
73
|
+
j8 = U8TO32_LITTLE(key + 16);
|
|
74
|
+
j9 = U8TO32_LITTLE(key + 20);
|
|
75
|
+
j10 = U8TO32_LITTLE(key + 24);
|
|
76
|
+
j11 = U8TO32_LITTLE(key + 28);
|
|
77
|
+
j12 = 0;
|
|
78
|
+
j13 = 0;
|
|
79
|
+
j14 = U8TO32_LITTLE(iv + 0);
|
|
80
|
+
j15 = U8TO32_LITTLE(iv + 4);
|
|
81
|
+
|
|
82
|
+
for (;;) {
|
|
83
|
+
if (length < 64) {
|
|
84
|
+
memcpy(tmp, data, length);
|
|
85
|
+
data = tmp;
|
|
86
|
+
ctarget = cipher;
|
|
87
|
+
cipher = tmp;
|
|
88
|
+
}
|
|
89
|
+
x0 = j0;
|
|
90
|
+
x1 = j1;
|
|
91
|
+
x2 = j2;
|
|
92
|
+
x3 = j3;
|
|
93
|
+
x4 = j4;
|
|
94
|
+
x5 = j5;
|
|
95
|
+
x6 = j6;
|
|
96
|
+
x7 = j7;
|
|
97
|
+
x8 = j8;
|
|
98
|
+
x9 = j9;
|
|
99
|
+
x10 = j10;
|
|
100
|
+
x11 = j11;
|
|
101
|
+
x12 = j12;
|
|
102
|
+
x13 = j13;
|
|
103
|
+
x14 = j14;
|
|
104
|
+
x15 = j15;
|
|
105
|
+
for (i = 8;i > 0;i -= 2) {
|
|
106
|
+
QUARTERROUND( x0, x4, x8,x12)
|
|
107
|
+
QUARTERROUND( x1, x5, x9,x13)
|
|
108
|
+
QUARTERROUND( x2, x6,x10,x14)
|
|
109
|
+
QUARTERROUND( x3, x7,x11,x15)
|
|
110
|
+
QUARTERROUND( x0, x5,x10,x15)
|
|
111
|
+
QUARTERROUND( x1, x6,x11,x12)
|
|
112
|
+
QUARTERROUND( x2, x7, x8,x13)
|
|
113
|
+
QUARTERROUND( x3, x4, x9,x14)
|
|
114
|
+
}
|
|
115
|
+
x0 = PLUS( x0, j0);
|
|
116
|
+
x1 = PLUS( x1, j1);
|
|
117
|
+
x2 = PLUS( x2, j2);
|
|
118
|
+
x3 = PLUS( x3, j3);
|
|
119
|
+
x4 = PLUS( x4, j4);
|
|
120
|
+
x5 = PLUS( x5, j5);
|
|
121
|
+
x6 = PLUS( x6, j6);
|
|
122
|
+
x7 = PLUS( x7, j7);
|
|
123
|
+
x8 = PLUS( x8, j8);
|
|
124
|
+
x9 = PLUS( x9, j9);
|
|
125
|
+
x10 = PLUS(x10,j10);
|
|
126
|
+
x11 = PLUS(x11,j11);
|
|
127
|
+
x12 = PLUS(x12,j12);
|
|
128
|
+
x13 = PLUS(x13,j13);
|
|
129
|
+
x14 = PLUS(x14,j14);
|
|
130
|
+
x15 = PLUS(x15,j15);
|
|
131
|
+
|
|
132
|
+
x0 = XOR( x0,U8TO32_LITTLE((uint8_t*)data + 0));
|
|
133
|
+
x1 = XOR( x1,U8TO32_LITTLE((uint8_t*)data + 4));
|
|
134
|
+
x2 = XOR( x2,U8TO32_LITTLE((uint8_t*)data + 8));
|
|
135
|
+
x3 = XOR( x3,U8TO32_LITTLE((uint8_t*)data + 12));
|
|
136
|
+
x4 = XOR( x4,U8TO32_LITTLE((uint8_t*)data + 16));
|
|
137
|
+
x5 = XOR( x5,U8TO32_LITTLE((uint8_t*)data + 20));
|
|
138
|
+
x6 = XOR( x6,U8TO32_LITTLE((uint8_t*)data + 24));
|
|
139
|
+
x7 = XOR( x7,U8TO32_LITTLE((uint8_t*)data + 28));
|
|
140
|
+
x8 = XOR( x8,U8TO32_LITTLE((uint8_t*)data + 32));
|
|
141
|
+
x9 = XOR( x9,U8TO32_LITTLE((uint8_t*)data + 36));
|
|
142
|
+
x10 = XOR(x10,U8TO32_LITTLE((uint8_t*)data + 40));
|
|
143
|
+
x11 = XOR(x11,U8TO32_LITTLE((uint8_t*)data + 44));
|
|
144
|
+
x12 = XOR(x12,U8TO32_LITTLE((uint8_t*)data + 48));
|
|
145
|
+
x13 = XOR(x13,U8TO32_LITTLE((uint8_t*)data + 52));
|
|
146
|
+
x14 = XOR(x14,U8TO32_LITTLE((uint8_t*)data + 56));
|
|
147
|
+
x15 = XOR(x15,U8TO32_LITTLE((uint8_t*)data + 60));
|
|
148
|
+
|
|
149
|
+
j12 = PLUSONE(j12);
|
|
150
|
+
if (!j12)
|
|
151
|
+
{
|
|
152
|
+
j13 = PLUSONE(j13);
|
|
153
|
+
/* stopping at 2^70 bytes per iv is user's responsibility */
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
U32TO8_LITTLE(cipher + 0,x0);
|
|
157
|
+
U32TO8_LITTLE(cipher + 4,x1);
|
|
158
|
+
U32TO8_LITTLE(cipher + 8,x2);
|
|
159
|
+
U32TO8_LITTLE(cipher + 12,x3);
|
|
160
|
+
U32TO8_LITTLE(cipher + 16,x4);
|
|
161
|
+
U32TO8_LITTLE(cipher + 20,x5);
|
|
162
|
+
U32TO8_LITTLE(cipher + 24,x6);
|
|
163
|
+
U32TO8_LITTLE(cipher + 28,x7);
|
|
164
|
+
U32TO8_LITTLE(cipher + 32,x8);
|
|
165
|
+
U32TO8_LITTLE(cipher + 36,x9);
|
|
166
|
+
U32TO8_LITTLE(cipher + 40,x10);
|
|
167
|
+
U32TO8_LITTLE(cipher + 44,x11);
|
|
168
|
+
U32TO8_LITTLE(cipher + 48,x12);
|
|
169
|
+
U32TO8_LITTLE(cipher + 52,x13);
|
|
170
|
+
U32TO8_LITTLE(cipher + 56,x14);
|
|
171
|
+
U32TO8_LITTLE(cipher + 60,x15);
|
|
172
|
+
|
|
173
|
+
if (length <= 64) {
|
|
174
|
+
if (length < 64) {
|
|
175
|
+
memcpy(ctarget, cipher, length);
|
|
176
|
+
}
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
length -= 64;
|
|
180
|
+
cipher += 64;
|
|
181
|
+
data = (uint8_t*)data + 64;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
#include <stdint.h>
|
|
2
|
-
#include <stddef.h>
|
|
3
|
-
#ifdef __cplusplus
|
|
4
|
-
extern "C" {
|
|
5
|
-
#endif
|
|
6
|
-
void chacha8(const void* data, size_t length, const uint8_t* key, const uint8_t* iv, char* cipher);
|
|
7
|
-
|
|
8
|
-
#define CHACHA8_KEY_SIZE 32
|
|
9
|
-
#define CHACHA8_IV_SIZE 8
|
|
10
|
-
|
|
11
|
-
#ifdef __cplusplus
|
|
12
|
-
}
|
|
13
|
-
#endif
|
|
14
|
-
|
|
1
|
+
#include <stdint.h>
|
|
2
|
+
#include <stddef.h>
|
|
3
|
+
#ifdef __cplusplus
|
|
4
|
+
extern "C" {
|
|
5
|
+
#endif
|
|
6
|
+
void chacha8(const void* data, size_t length, const uint8_t* key, const uint8_t* iv, char* cipher);
|
|
7
|
+
|
|
8
|
+
#define CHACHA8_KEY_SIZE 32
|
|
9
|
+
#define CHACHA8_IV_SIZE 8
|
|
10
|
+
|
|
11
|
+
#ifdef __cplusplus
|
|
12
|
+
}
|
|
13
|
+
#endif
|
|
14
|
+
|