{"id":20770346,"url":"https://github.com/genaronetwork/node-libgenaro","last_synced_at":"2025-09-09T04:41:13.197Z","repository":{"id":57157247,"uuid":"125144077","full_name":"GenaroNetwork/node-libgenaro","owner":"GenaroNetwork","description":"Nodejs implementation of libgenaro","archived":false,"fork":false,"pushed_at":"2019-01-15T07:45:56.000Z","size":3760,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-28T00:16:34.044Z","etag":null,"topics":["encryption","nodejs","storage"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GenaroNetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-14T02:32:56.000Z","updated_at":"2019-01-11T09:26:56.000Z","dependencies_parsed_at":"2022-09-07T20:50:28.634Z","dependency_job_id":null,"html_url":"https://github.com/GenaroNetwork/node-libgenaro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/GenaroNetwork/node-libgenaro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenaroNetwork%2Fnode-libgenaro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenaroNetwork%2Fnode-libgenaro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenaroNetwork%2Fnode-libgenaro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenaroNetwork%2Fnode-libgenaro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GenaroNetwork","download_url":"https://codeload.github.com/GenaroNetwork/node-libgenaro/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GenaroNetwork%2Fnode-libgenaro/sbom","scorecard":{"id":55483,"data":{"date":"2025-08-11","repo":{"name":"github.com/GenaroNetwork/node-libgenaro","commit":"25b28a0eed1151e41f58fb60d061b85a0d66c332"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU Lesser General Public License v2.1: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"19 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-h6ch-v84p-w6p9","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-qh2h-chj9-jffq","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-15T00:38:51.782Z","repository_id":57157247,"created_at":"2025-08-15T00:38:51.782Z","updated_at":"2025-08-15T00:38:51.782Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274244228,"owners_count":25248157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["encryption","nodejs","storage"],"created_at":"2024-11-17T12:08:49.056Z","updated_at":"2025-09-09T04:41:13.169Z","avatar_url":"https://github.com/GenaroNetwork.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-libgenaro\n\nNode.js library for encrypted file transfer on the GenaroNetwork network via bindings to [libgenaro](https://github.com/GenaroNetwork/libgenaro).\n\n## Example Usage\n\nInstall via npm:\n\n```bash\nnpm install libgenaro\n```\n\nFirst setup the storj environment with authentication and encryption options:\n\n```js\nconst { Environment } = require('libgenaro');\n\nconst libgenaro = new Environment({\n    bridgeUrl: 'http://111.111.111.111:8080',\n    keyFile: `{\n        \"address\": \"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\n        \"crypto\":{\"ciphertext\":\"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\",\n        \"cipherparams\":{\"iv\":\"cccccccccccccccccccccccccccccccc\"},\"cipher\":\"aes-128-ctr\",\n        \"kdf\":\"scrypt\",\"kdfparams\":{\"dklen\":32,\"salt\":\"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd\",\"n\":262144,\"r\":8,\n        \"p\":1},\"mac\":\"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee\"},\n        \"id\": \"ffffffff-1111-2222-3333-444444444444\",\n        \"version\": 3\n    }\n    `,\n    passphrase: '123456',\n});\n```\n\nUpload a file to a bucket:\n\n```js\nconst bucketId = '368be0816766b28fd5f43af5';\nconst filePath = './test-upload.data';\n\nconst keyCtr = env.generateEncryptionInfo(bucketId);\nconst index = keyCtr.index;\nconst key = keyCtr.key;\nconst ctr = keyCtr.ctr;\n\nconst rsaKey = xxxxxx; // encrypted key with rsa\nconst rsaCtr = xxxxxx; // encrypted ctr with rsa\n\nconst state = libgenaro.storeFile(bucketId, fileOrData, isFilePath, {\n  filename: 'test-upload.data',\n  progressCallback: function(progress, fileBytes) {\n    console.log('Progress:', progress);\n  },\n  finishedCallback: function(err, fileId, fileBytes, sha256_of_encrypted) {\n    if (err) {\n      return console.error(err);\n    }\n    console.log('File complete:', fileId);\n  },\n  index: index,\n  key: key,\n  ctr: ctr,\n  rsaKey: rsaKey,\n  rsaCtr: rsaCtr,\n});\n\n```\n\nDownload a file from a bucket:\n\n```js\nconst bucketId = '368be0816766b28fd5f43af5';\nconst fileId = '998960317b6725a3f8080c2b';\nconst downloadFilePath = './test-download.data';\n\nconst key = xxxxxx; // the file encryption key\nconst ctr = xxxxxx; // the file encryption ctr\n\nconst state = libgenaro.resolveFile(bucketId, fileId, filePath, {\n  key: key,\n  ctr: ctr,\n  overwrite: overwrite,\n  decrypt: decrypt,\n  progressCallback: function(progress, fileBytes) {\n    console.log('progress:', progress);\n  },\n  finishedCallback: function(err, fileBytes, sha256) {\n    if (err) {\n      return console.error(err);\n    }\n    console.log('File download complete');\n  }\n});\n```\n\nOnce finished, you should call to zero and free memory holding encryption keys:\n\n```js\nlibgenaro.destroy();\n```\n\n## API\n\n- `Environment(options)` - A constructor for keeping encryption options and other environment settings, see available methods below\n\nMethods available on an instance of `Environment`:\n\n- `getInfo(function(err, result) {})` - Get general API info`\n- `getBuckets(function(err, result) {})` - Get list of available buckets\n- `deleteBucket(bucketId, function(err, result) {})` - Delete a bucket\n- `renameBucket(bucketId, function(err) {})` - Rename a bucket\n- `listFiles(bucketId, function(err, result) {})` - List files in a bucket\n- `storeFile(bucketId, fileOrData, isFilePath, options)` - Upload a file, return state object\n- `storeFileCancel(state)` - Cancel an upload\n- `resolveFile(bucketId, fileId, filePath, options)` - Download a file, return state object\n- `resolveFileCancel(state)` - Cancel a download\n- `deleteFile(bucketId, fileId, function(err, result) {})` - Delete a file from a bucket\n- `generateEncryptionInfo(bucketId)` - Generate the key and ctr of AES-256-CTR for file encryption, and also the index related to the key and ctr, return undefined if fail\n- `decryptFile(filePath, key, ctr)` - Decrypt the undecrypted file use the key and ctr of AES-256-CTR, return the decrypted data if success, undefined if fail\n- `encryptMeta(meta)` - Encrypt the meta use AES-256-GCM combined with HMAC-SHA512, return the encrypted meta if success, undefined if fail\n- `encryptMetaToFile(meta, filePath)` - Encrypt the meta use AES-256-GCM combined with HMAC-SHA512 to filePath\n- `decryptMeta(encryptedMeta)` - Decrypt the encryptedMeta, return the decrypted meta if success, undefined if fail\n- `decryptMetaFromFile(filePath)` - Decrypt the data in filePath, return the decrypted data if success, undefined if fail\n- `destroy()` - Zero and free memory of encryption keys and the environment\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenaronetwork%2Fnode-libgenaro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenaronetwork%2Fnode-libgenaro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenaronetwork%2Fnode-libgenaro/lists"}