{"id":26187979,"url":"https://github.com/ryex/cyclebyte","last_synced_at":"2025-07-23T12:36:04.274Z","repository":{"id":7928982,"uuid":"9317424","full_name":"Ryex/CycleByte","owner":"Ryex","description":null,"archived":false,"fork":false,"pushed_at":"2013-04-09T11:04:25.000Z","size":136,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-11T23:54:04.092Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ryex.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":"2013-04-09T09:16:57.000Z","updated_at":"2014-01-17T01:22:03.000Z","dependencies_parsed_at":"2022-09-25T05:10:54.912Z","dependency_job_id":null,"html_url":"https://github.com/Ryex/CycleByte","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ryex/CycleByte","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ryex%2FCycleByte","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ryex%2FCycleByte/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ryex%2FCycleByte/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ryex%2FCycleByte/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ryex","download_url":"https://codeload.github.com/Ryex/CycleByte/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ryex%2FCycleByte/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266680403,"owners_count":23967793,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":"2025-03-11T23:54:05.502Z","updated_at":"2025-07-23T12:36:04.247Z","avatar_url":"https://github.com/Ryex.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CycleByte\n\n\nA shifting Symmetric Encryption that uses the previous chunk of data in the encryption of the next.\n\nIt uses an implementation of SHA1 and the Mersenne Twister pseudorandom number generator\n\n\n## Usage\n\n### Encryption\n\n\nStep 1) create an encryption\n \nthe chunk_size is the maximum number of bytes in a copntinues section of encryption. is is sugested to set this size to be about 1/4 to 1/16 the size\nof the data to be encrypted. the smaller the number the more ties the encryption will change, the slower the encryption will happen, and the more theroeticly secure the data is.\n\nbe sure to use the same `max_chunk_size` to encrypt and decrypt a message\n\n    char* key = \"IAmAnEncryptionKeyChangeMe\";\n    long key_size = strlen(key);\n    int max_chunk_size = 10;\n    CycleByte cyc(key, key_size, max_chunk_size);\n\nStep 2) encrypt some data\n\nnote that `data` can be anything as your just casting it to an array of unsigned chars and reading the raw memory\n\na copy encryption, you will need an array the same size as the data to be encrypted \n\n\n    char data[] = \";alksdhfp;oqnl;wkjnekjbqca;opsidfbqwlke\"\n    char result[40]\n    int len = strlen(data);\n    cyc.encrypt(reinterpret_cast\u003cunsigned char*\u003e(data), result, len);\n\n\nan inplace encryption, your array will be modifyed to contain the encrypted version \n(WARNING: DONT USE INPLACE ENCRYPTION ON AN OBJECT YOU WILL NEED AFTER AS IT WILL BE CORUPTED!) \n\n\n    char data[] = \";alksdhfp;oqnl;wkjnekjbqca;opsidfbqwlke\"\n    int len = strlen(data);\n    cyc.encrypt_inplace(reinterpret_cast\u003cunsigned char*\u003e(data), len);\n\n\n### Decryption\nStep 1) create an encryption \n\nthe chunk_size is the maximum number of bytes in a copntinues section of encryption. is is sugested to set this size to be about 1/4 to 1/16 the size\nof the data to be encrypted. the smaller the number the more ties the encryption will change, the slower the encryption will happen, and the more theroeticly secure the data is.\n\nbe sure to use the same `max_chunk_size` to encrypt and decrypt a message\n\n\n    char* key = \"IAmAnEncryptionKeyChangeMe\";\n    long key_size = strlen(key);\n    int max_chunk_size = 10;\n    CycleByte cyc(key, key_size, max_chunk_size);\n\n\nStep 2) decrypt some data\n\nnote that `data` can be anything as your just casting it to an array of unsigned chars and reading the raw memory\n\na copy decryption, you will need an array the same size as the data to be decrypted \n\n    // encrypted data can use non printable charaters to lets encrypt some data then decrypt it\n    char data[] = \";alksdhfp;oqnl;wkjnekjbqca;opsidfbqwlke\"\n    char result[40]\n    int len = strlen(data);\n    cyc.encrypt(reinterpret_cast\u003cunsigned char*\u003e(data), result, len);\n\n    // now to decrypt\n    char decrypted[40]\n    cyc.decrypt(reinterpret_cast\u003cunsigned char*\u003e(result), decrypted, len)\n\n\nan inplace encryption, your array will be modifyed to contain the encrypted version \n(WARNING: DONT USE INPLACE DECRYPTION ON AN OBJECT YOU WILL NEED AFTER AS IT WILL BE CORUPTED!) \n\n\n    // encrypted data can use non printable charaters to lets encrypt some data then decrypt it\n    char data[] = \";alksdhfp;oqnl;wkjnekjbqca;opsidfbqwlke\"\n    int len = strlen(data);\n    cyc.encrypt_inplace(reinterpret_cast\u003cunsigned char*\u003e(data), len);\n\n    //inspect your data array, it is now encrypted\n\n    // now to decrypt\n    char decrypted[40]\n    cyc.decrypt_inplace(reinterpret_cast\u003cunsigned char*\u003e(data), len)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryex%2Fcyclebyte","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryex%2Fcyclebyte","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryex%2Fcyclebyte/lists"}