{"id":13734142,"url":"https://github.com/kkAyataka/plusaes","last_synced_at":"2025-05-08T10:30:58.691Z","repository":{"id":36446083,"uuid":"40751133","full_name":"kkAyataka/plusaes","owner":"kkAyataka","description":"Header only C++ AES cipher library","archived":false,"fork":false,"pushed_at":"2024-06-21T09:02:41.000Z","size":819,"stargazers_count":189,"open_issues_count":2,"forks_count":41,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-15T02:34:33.362Z","etag":null,"topics":["cpp","encryption","header-only"],"latest_commit_sha":null,"homepage":"https://kkayataka.github.io/plusaes/doc/index.html","language":"C++","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/kkAyataka.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE_1_0.txt","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":"2015-08-15T07:47:42.000Z","updated_at":"2024-11-13T08:05:19.000Z","dependencies_parsed_at":"2024-11-15T02:32:29.678Z","dependency_job_id":"14bc56e1-1552-4239-8841-f8e17f89dbc3","html_url":"https://github.com/kkAyataka/plusaes","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkAyataka%2Fplusaes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkAyataka%2Fplusaes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkAyataka%2Fplusaes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kkAyataka%2Fplusaes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kkAyataka","download_url":"https://codeload.github.com/kkAyataka/plusaes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253045628,"owners_count":21845740,"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":["cpp","encryption","header-only"],"created_at":"2024-08-03T03:00:52.911Z","updated_at":"2025-05-08T10:30:58.297Z","avatar_url":"https://github.com/kkAyataka.png","language":"C++","readme":"plusaes\n=======\n\nHeader only C++ AES cipher library.\n\n- [GitHub Repository](https://github.com/kkAyataka/plusaes)\n- [API Reference](https://kkayataka.github.io/plusaes/doc/namespaceplusaes.html)\n\n\n## Development Environment\n\n- Visual Studio 16 2022 (v143)\n- Xcode 14.3 (Apple clang 14.0.3)\n- GCC 4.8.5 (CentOS 7)\n\n\n## Supported block cipher mode\n\n- ECB\n- CBC\n- GCM\n- CTR\n\n\n## Usage\n\nFor example, about AES-CBC 128-bit.\nEncrypts by the `plusaes::encrypt_cbc` and decripts by the `plusaes::decrypt_cbc`.\n\nYou can use convenient functions like `plusaes::key_from_string` and `plusaes::get_padded_encrypted_size`.\n\n```cpp\n#include \"plusaes/plusaes.hpp\"\n\n#include \u003cstring\u003e\n#include \u003cvector\u003e\n\nint main() {\n    // AES-CBC 128-bit\n\n    // parameters\n    const std::string raw_data = \"Hello, plusaes\";\n    const std::vector\u003cunsigned char\u003e key = plusaes::key_from_string(\u0026\"EncryptionKey128\"); // 16-char = 128-bit\n    const unsigned char iv[16] = {\n        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,\n        0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,\n    };\n\n    // encrypt\n    const unsigned long encrypted_size = plusaes::get_padded_encrypted_size(raw_data.size());\n    std::vector\u003cunsigned char\u003e encrypted(encrypted_size);\n\n    plusaes::encrypt_cbc((unsigned char*)raw_data.data(), raw_data.size(), \u0026key[0], key.size(), \u0026iv, \u0026encrypted[0], encrypted.size(), true);\n    // fb 7b ae 95 d5 0f c5 6f 43 7d 14 6b 6a 29 15 70\n\n    // decrypt\n    unsigned long padded_size = 0;\n    std::vector\u003cunsigned char\u003e decrypted(encrypted_size);\n\n    plusaes::decrypt_cbc(\u0026encrypted[0], encrypted.size(), \u0026key[0], key.size(), \u0026iv, \u0026decrypted[0], decrypted.size(), \u0026padded_size);\n    // Hello, plusaes\n}\n```\n\n\nLicense\n-------\n[Boost Software License](LICENSE_1_0.txt)\n","funding_links":[],"categories":["Cryptography and Security"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FkkAyataka%2Fplusaes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FkkAyataka%2Fplusaes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FkkAyataka%2Fplusaes/lists"}