{"id":27024735,"url":"https://github.com/ismaelsadeeq/otp-stream-cypher","last_synced_at":"2025-04-04T21:30:04.068Z","repository":{"id":278594906,"uuid":"936136195","full_name":"ismaelsadeeq/otp-stream-cypher","owner":"ismaelsadeeq","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-20T15:57:06.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-20T16:40:27.052Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/ismaelsadeeq.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":"2025-02-20T15:32:06.000Z","updated_at":"2025-02-20T15:57:11.000Z","dependencies_parsed_at":"2025-02-20T16:40:32.937Z","dependency_job_id":null,"html_url":"https://github.com/ismaelsadeeq/otp-stream-cypher","commit_stats":null,"previous_names":["ismaelsadeeq/otp-stream-cypher"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismaelsadeeq%2Fotp-stream-cypher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismaelsadeeq%2Fotp-stream-cypher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismaelsadeeq%2Fotp-stream-cypher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismaelsadeeq%2Fotp-stream-cypher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ismaelsadeeq","download_url":"https://codeload.github.com/ismaelsadeeq/otp-stream-cypher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247251835,"owners_count":20908582,"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":[],"created_at":"2025-04-04T21:30:03.430Z","updated_at":"2025-04-04T21:30:04.045Z","avatar_url":"https://github.com/ismaelsadeeq.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n#### One-Time Pad Stream Cipher\nThis project implements a simple One-Time Pad (OTP) data encryption and decryption system.\n\n#### How It Works\nStream ciphers encrypt data bit-by-bit or byte-by-byte using a randomly generated keystream.  \nIt does this by XORing the plaintext with the randomly generated key.\n\n\n### Usage\n\n1. Installation\n\n    ```sh\n    git clone https://github.com/ismaelsadeeq/otp-stream-cipher\n    cd otp-stream-cipher\n    git clone https://github.com/ismaelsadeeq/crypto-utils\n    ```\n\n\n2. Include the library in your project\n\n    E.g Create a new file, `main.cpp`\n\n    ```c++\n    // main.cpp\n    #include \u003ciostream\u003e\n    #include \"one_time_pad.h\"\n\n    int main() {\n        try {\n            OneTimePad otp;\n\n            // Message to encrypt\n            std::string message = \"Secret123\";\n\n            // Encrypt the message\n            auto encrypted = otp.encrypt(message);\n            std::cout \u003c\u003c \"Key:      \" \u003c\u003c encrypted.first \u003c\u003c \"\\n\"\n                    \u003c\u003c \"Cipher:   \" \u003c\u003c encrypted.second \u003c\u003c \"\\n\";\n\n            // Decrypt the message\n            std::string decrypted = otp.decrypt(encrypted.first, encrypted.second);\n            std::cout \u003c\u003c \"Decrypted message: \" \u003c\u003c decrypted \u003c\u003c std::endl;\n        } catch (const std::exception\u0026 ex) {\n            std::cerr \u003c\u003c \"Exception: \" \u003c\u003c ex.what() \u003c\u003c std::endl;\n            return 1;\n        }\n        return 0;\n    }\n    ```\n\nNote: This implementation doesn't require any external libraries. You can compile it with your preferred C++ compiler.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismaelsadeeq%2Fotp-stream-cypher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fismaelsadeeq%2Fotp-stream-cypher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismaelsadeeq%2Fotp-stream-cypher/lists"}