{"id":23224689,"url":"https://github.com/azzamsa/nrot","last_synced_at":"2025-04-05T16:47:01.349Z","repository":{"id":48518415,"uuid":"516926077","full_name":"azzamsa/nrot","owner":"azzamsa","description":"Simple letter substitution cipher 🔐","archived":false,"fork":false,"pushed_at":"2023-12-08T03:43:40.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-12T05:21:01.591Z","etag":null,"topics":["decryption","encryption","rot13"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/azzamsa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-07-23T01:11:01.000Z","updated_at":"2022-07-23T05:48:08.000Z","dependencies_parsed_at":"2023-12-08T04:38:35.830Z","dependency_job_id":null,"html_url":"https://github.com/azzamsa/nrot","commit_stats":{"total_commits":16,"total_committers":1,"mean_commits":16.0,"dds":0.0,"last_synced_commit":"c39694a3da32e3f5ad5f4803fb507ea9ab513670"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azzamsa%2Fnrot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azzamsa%2Fnrot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azzamsa%2Fnrot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/azzamsa%2Fnrot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/azzamsa","download_url":"https://codeload.github.com/azzamsa/nrot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247369933,"owners_count":20927927,"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":["decryption","encryption","rot13"],"created_at":"2024-12-18T23:35:57.614Z","updated_at":"2025-04-05T16:47:01.324Z","avatar_url":"https://github.com/azzamsa.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003enROT\u003c/h1\u003e\n\n\u003cimg src='docs/padlock.svg' width=80px /\u003e\n\nSimple letter substitution cipher 🔐️\n\n\u003ca href=\"https://github.com/azzamsa/nrot/workflows/ci.yml\"\u003e\n    \u003cimg src=\"https://github.com/azzamsa/nrot/workflows/ci/badge.svg\" alt=\"Build status\" /\u003e\n  \u003c/a\u003e\n\n\u003ca href=\"https://crates.io/crates/nrot\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/v/nrot.svg\"\u003e\n  \u003c/a\u003e\n\n\u003ca href=\"https://docs.rs/nrot/\"\u003e\n    \u003cimg src=\"https://docs.rs/nrot/badge.svg\"\u003e\n  \u003c/a\u003e\n\n\u003ca href=\"https://azzamsa.com/support/\"\u003e\n    \u003cimg alt=\"Sponsor me\" src=\"https://img.shields.io/badge/Sponsor%20Me-%F0%9F%92%96-ff69b4\"\u003e\n  \u003c/a\u003e\n\n\u003c/div\u003e\n\n---\n\n## Features\n\n- ROT encryption \u0026 decryption\n- Exhaustive testing\n\n## Usage\n\n```rust\nuse nrot::{rot, rot_letter, Mode};\n\nfn encrypt(input: String) {\n    let rotation = 13;\n\n    let input_length = input.len();\n    let input_bytes = input.as_bytes();\n\n    if input_length == 1 {\n        let byte_result = rot_letter(Mode::Encrypt, input_bytes[0], rotation);\n        println!(\"{}\", String::from_utf8_lossy(\u0026[byte_result]))\n    } else {\n        let bytes_result = rot(Mode::Encrypt, input_bytes, rotation);\n        println!(\"{}\", String::from_utf8_lossy(\u0026bytes_result))\n    };\n}\n\nfn decrypt(input: String) {\n    let rotation = 13;\n\n    let input_length = input.len();\n    let input_bytes = input.as_bytes();\n\n    if input_length == 1 {\n        let byte_result = rot_letter(Mode::Decrypt, input_bytes[0], rotation);\n        println!(\"{}\", String::from_utf8_lossy(\u0026[byte_result]))\n    } else {\n        let bytes_result = rot(Mode::Decrypt, input_bytes, rotation);\n        println!(\"{}\", String::from_utf8_lossy(\u0026bytes_result))\n    };\n}\n\nfn main() {\n    let input = \"Hello, world!\".to_string();\n    encrypt(input);\n\n    let input = \"Uryyb, jbeyq!\".to_string();\n    decrypt(input);\n}\n```\n\nTo learn more, see other [examples](examples/).\n\n## Credits\n\n- ROT13 implementation is inspired by [Cameron Phillips's ROT13](https://github.com/cameronp98/rot13)\n- [Noto Emoji](https://github.com/googlefonts/noto-emoji)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazzamsa%2Fnrot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fazzamsa%2Fnrot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fazzamsa%2Fnrot/lists"}