{"id":21638908,"url":"https://github.com/theodoreai/crypto-tool","last_synced_at":"2026-05-08T14:06:25.824Z","repository":{"id":143468515,"uuid":"608492555","full_name":"TheodoreAI/crypto-tool","owner":"TheodoreAI","description":"The following is a javascript module written to encrypt and decrypt JSON data using the Advanced Encryption Standard.","archived":false,"fork":false,"pushed_at":"2023-03-18T20:05:46.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-11T16:40:00.761Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheodoreAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-02T05:59:31.000Z","updated_at":"2023-03-18T19:46:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"be826643-b541-4a03-9b0b-54159f356bb0","html_url":"https://github.com/TheodoreAI/crypto-tool","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/TheodoreAI/crypto-tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheodoreAI%2Fcrypto-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheodoreAI%2Fcrypto-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheodoreAI%2Fcrypto-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheodoreAI%2Fcrypto-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheodoreAI","download_url":"https://codeload.github.com/TheodoreAI/crypto-tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheodoreAI%2Fcrypto-tool/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273392259,"owners_count":25097255,"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-03T02:00:09.631Z","response_time":76,"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":[],"created_at":"2024-11-25T04:12:21.063Z","updated_at":"2026-05-08T14:06:20.797Z","avatar_url":"https://github.com/TheodoreAI.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CryptoTool - A Simple File Encryption and Decryption Tool\n\nCryptoTool is a Node.js module for encrypting and decrypting files using the AES-256-CBC algorithm. It provides a simple object-oriented interface for handling encryption and decryption tasks.\n\n## Installation\n\nPlace the cryptoTool.js file in your project directory.\n\n## Usage\n\nFirst, import the CryptoTool class from the cryptoTool.js file:\n\n```javascript\nconst CryptoTool = require('./cryptoTool');\n```\n\nNext, create a new instance of the CryptoTool class with a custom initialization vector (IV) and secret key:\n\n```javascript\nconst crypto = require('crypto');\nconst iv = crypto.randomBytes(16);\nconst key = crypto.randomBytes(32);\n\nconst initializationVector = Buffer.from(iv, 'hex');\nconst secretKey = Buffer.from(key, 'hex');\nconst cryptoTool = new CryptoTool(initializationVector, secretKey);\n```\n\nUse the cryptoTool instance to call the writeEncryptedMessage and writeDecryptedMessage methods, which will encrypt a file and decrypt the encrypted file, respectively:\n\n```javascript\ncryptoTool.writeEncryptedMessage(\"message.json\");\ncryptoTool.writeDecryptedMessage(\"encryptedMessage.json\");\n```\n\nAdditionally, you can use the encrypt and decrypt methods directly to encrypt and decrypt data:\n\n```javascript\nconst encryptedData = cryptoTool.encrypt(\"message.json\");\nconsole.log(\"Encrypted data:\", encryptedData);\n\nconst decryptedData = cryptoTool.decrypt(encryptedData);\nconsole.log(\"Decrypted data:\", decryptedData);\n```\n\n## Example\n\nHere's a complete example of how to use the CryptoTool module:\n\n```javascript\nconst CryptoTool = require('./cryptoTool');\n\n// Create a new instance of the CryptoTool class with custom iv and key\nconst crypto = require('crypto');\nconst iv = crypto.randomBytes(16);\nconst key = crypto.randomBytes(32);\n\nconst initializationVector = Buffer.from(iv, 'hex');\nconst secretKey = Buffer.from(key, 'hex');\nconst cryptoTool = new CryptoTool(initializationVector, secretKey);\n\n// Use the instance to call the methods\ncryptoTool.writeEncryptedMessage(\"message.json\");\ncryptoTool.writeDecryptedMessage(\"encryptedMessage.json\");\n\n// You can also use the encrypt and decrypt methods directly if needed\nconst encryptedData = cryptoTool.encrypt(\"message.json\");\nconsole.log(\"Encrypted data:\", encryptedData);\n\nconst decryptedData = cryptoTool.decrypt(encryptedData);\nconsole.log(\"Decrypted data:\", decryptedData);\n```\n\n## In Action\n\n[decryptedJson]()\n[encryptedJson]()\n\n\n## License\n\nThis project is released under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodoreai%2Fcrypto-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheodoreai%2Fcrypto-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheodoreai%2Fcrypto-tool/lists"}