{"id":21880449,"url":"https://github.com/definetlynotai/cryptoxide","last_synced_at":"2025-07-21T07:31:44.765Z","repository":{"id":260321505,"uuid":"880903958","full_name":"DefinetlyNotAI/Cryptoxide","owner":"DefinetlyNotAI","description":"Special Rust mini library to define your own cryptography hashes","archived":false,"fork":false,"pushed_at":"2024-10-30T17:20:12.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-30T18:21:24.624Z","etag":null,"topics":["cryptography","custom","customizable","library","mini","rust","side-project"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DefinetlyNotAI.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-30T15:15:57.000Z","updated_at":"2024-10-30T17:20:16.000Z","dependencies_parsed_at":"2024-10-30T18:21:34.435Z","dependency_job_id":"d37138d7-b6ee-4d20-815f-85b750554c02","html_url":"https://github.com/DefinetlyNotAI/Cryptoxide","commit_stats":null,"previous_names":["definetlynotai/cryptoxide"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefinetlyNotAI%2FCryptoxide","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefinetlyNotAI%2FCryptoxide/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefinetlyNotAI%2FCryptoxide/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefinetlyNotAI%2FCryptoxide/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DefinetlyNotAI","download_url":"https://codeload.github.com/DefinetlyNotAI/Cryptoxide/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226888113,"owners_count":17698110,"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","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":["cryptography","custom","customizable","library","mini","rust","side-project"],"created_at":"2024-11-28T09:13:49.516Z","updated_at":"2024-11-28T09:13:50.164Z","avatar_url":"https://github.com/DefinetlyNotAI.png","language":"Rust","readme":"# Cryptography Project\n\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://github.com/DefinetlyNotAI/Cryptoxide/issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/DefinetlyNotAI/Cryptoxide\" alt=\"GitHub Issues\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/DefinetlyNotAI/Cryptoxide/tags\"\u003e\u003cimg src=\"https://img.shields.io/github/v/tag/DefinetlyNotAI/Cryptoxide\" alt=\"GitHub Tag\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/DefinetlyNotAI/Cryptoxide/graphs/commit-activity\"\u003e\u003cimg src=\"https://img.shields.io/github/commit-activity/t/DefinetlyNotAI/Cryptoxide\" alt=\"GitHub Commit Activity\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/DefinetlyNotAI/Cryptoxide/languages\"\u003e\u003cimg src=\"https://img.shields.io/github/languages/count/DefinetlyNotAI/Cryptoxide\" alt=\"GitHub Language Count\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/DefinetlyNotAI/Cryptoxide/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/check-runs/DefinetlyNotAI/Cryptoxide/main\" alt=\"GitHub Branch Check Runs\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/DefinetlyNotAI/Cryptoxide\"\u003e\u003cimg src=\"https://img.shields.io/github/repo-size/DefinetlyNotAI/Cryptoxide\" alt=\"GitHub Repo Size\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n## Overview\n\nThis project provides a simple command-line tool for encrypting and decrypting files \nusing AES-256 in CBC mode with PKCS7 padding. \nThe configuration for the encryption key and initialization vector (IV) is read from a JSON file.\n\n## Download\n\nClone the repository using the following command:\n\n```sh\ngit clone https://github.com/DefinetlyNotAI/Cryptoxide.git\ncd Cryptoxide/Cryptoxide\n```\n\nNow you may build and run the project. After doing the prerequisites and configuration steps.\n\n## Prerequisites\n\n- Rust and Cargo installed on your system.\n- A JSON configuration file named `config.json` in the root directory of the project.\n\n## Configuration\n\nCreate a `config.json` file in the root directory of your project with the following structure:\n\n```json\n{\n    \"key\": \"your_base64_encoded_key\",\n    \"iv\": \"your_base64_encoded_iv\"\n}\n```\n\n- `key`: A base64 encoded string representing the 32-byte encryption key.\n- `iv`: A base64 encoded string representing the 16-byte initialization vector.\n\n## Dependencies\n\nThe project uses the following dependencies:\n\n- `aes`: For AES encryption.\n- `block-modes`: For block cipher modes of operation.\n- `hex`: For decoding hexadecimal strings.\n- `serde`: For deserializing the JSON configuration.\n- `serde_json`: For parsing JSON.\n\nThese dependencies are specified in the `Cargo.toml` file:\n\n```toml\n[dependencies]\naes = \"0.7\"\nblock-modes = \"0.8\"\nhex = \"0.4\"\nserde = { version = \"1.0\", features = [\"derive\"] }\nserde_json = \"1.0\"\n```\n\n## Usage\n\n### Build the Project\n\nTo build the project, run the following command in the root directory:\n\n```sh\ncargo build --release\n```\n\n### Run the Project\n\nTo run the project, use the following command:\n\n```sh\ncargo run --release\n```\n\n### Encrypt a File\n\n1. Run the project.\n2. When prompted, enter `e` to choose encryption.\n3. Enter the path to the file you want to encrypt.\n\nThe encrypted file will be saved with the `.enc.ox` extension.\n\n### Decrypt a File\n\n1. Run the project.\n2. When prompted, enter `d` to choose decryption.\n3. Enter the path to the encrypted file (with the `.enc.ox` extension).\n\nThe decrypted file will be saved with its original name.\n\n## Example\n\n### Encrypting a File\n\n```sh\ncargo run --release\n# Do you want to encrypt or decrypt? (e/d): \ne\n# Enter the file path: \nexample.txt\n```\n\nThis will create an encrypted file named `example.txt.enc.ox`.\n\n### Decrypting a File\n\n```sh\ncargo run --release\n# Do you want to encrypt or decrypt? (e/d): \nd\n# Enter the file path: \nexample.txt.enc.ox\n```\n\nThis will create a decrypted file named `example.txt`.\n\n## Error Handling\n\nThe program might handle errors such as (Not tested:\n\n- Invalid file paths.\n- Errors during encryption or decryption.\n\nEnsure that the `config.json` file is correctly formatted and the file paths provided are valid.\n\nIt won't handle errors such as:\n\n- Incorrect encryption key or IV.\n- Missing or invalid configuration file.\n\n## License\n\nThis project is licensed under the MIT License. See the `LICENSE` file for more details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefinetlynotai%2Fcryptoxide","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefinetlynotai%2Fcryptoxide","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefinetlynotai%2Fcryptoxide/lists"}