{"id":41690709,"url":"https://github.com/konimarti/aes.c3l","last_synced_at":"2026-01-24T20:15:08.547Z","repository":{"id":263686639,"uuid":"891029751","full_name":"konimarti/aes.c3l","owner":"konimarti","description":"AES128/192/256 in pure C3","archived":false,"fork":false,"pushed_at":"2025-09-24T15:13:12.000Z","size":38,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-07T10:01:11.887Z","etag":null,"topics":["aes","aes-encryption","aes-encryption-decryption","c3","c3lang"],"latest_commit_sha":null,"homepage":"","language":"C3","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/konimarti.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-11-19T15:51:08.000Z","updated_at":"2025-09-24T15:13:16.000Z","dependencies_parsed_at":"2024-11-22T13:03:11.526Z","dependency_job_id":null,"html_url":"https://github.com/konimarti/aes.c3l","commit_stats":null,"previous_names":["konimarti/aes.c3l"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/konimarti/aes.c3l","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konimarti%2Faes.c3l","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konimarti%2Faes.c3l/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konimarti%2Faes.c3l/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konimarti%2Faes.c3l/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/konimarti","download_url":"https://codeload.github.com/konimarti/aes.c3l/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/konimarti%2Faes.c3l/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28736502,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T19:23:36.361Z","status":"ssl_error","status_checked_at":"2026-01-24T19:23:28.966Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aes","aes-encryption","aes-encryption-decryption","c3","c3lang"],"created_at":"2026-01-24T20:15:07.014Z","updated_at":"2026-01-24T20:15:08.539Z","avatar_url":"https://github.com/konimarti.png","language":"C3","funding_links":[],"categories":["Encryption"],"sub_categories":[],"readme":"## AES implementation for C3\n\nThis is an implementation of the AES ECB, CTR and CBC encryption algorithms for\nC3 based on the [tiny-AES-c](http://github.com/kokke/tiny-AES-c) project.\n\nIt supports 128, 192 and 256 bit key sizes.\n\nAPI overview:\n```cpp\nimport crypto::aes;\n\n// Initialize the context with one of:\nAesCtx *ctx = AesCtx{}.init(aes::AES128, key);\nAesCtx *ctx = AesCtx{}.init_with_iv(aes::AES128, key, iv);\n\n// Start encrypting and decrypting with either the ECB, CBC or CTR modes.\n// Each mode defines a namespace (`crypto::aes::ecb`, `crypto::aes::cbc`,\n// `crypto::aes::ctr`) with the following function signatures:\n\nfn void encrypt_buffer(AesCtx *ctx, char[] text, char[] cipher)\nfn void decrypt_buffer(AesCtx *ctx, char[] cipher, char[] text)\n\nfn char[] encrypt(AesCtx *ctx, char[] text, Allocator allocator = mem)\nfn char[] decrypt(AesCtx *ctx, char[] cipher, Allocator allocator = mem)\n\nfn char[] tencrypt(AesCtx *ctx, char[] text)\nfn char[] tdecrypt(AesCtx *ctx, char[] cipher)\n```\n\n\n### Example: AES128 ECB encryption\n\n```cpp\nmodule app;\n\nimport crypto::aes;\nimport std::io;\n\nfn void main()\n{\n\tchar[] key \t= x\"2b7e151628aed2a6abf7158809cf4f3c\";\n\tchar[] text\t= x\"6bc1bee22e409f96e93d7e117393172a\";\n\n\tchar[] cipher = ecb::encrypt_new((AesCtx){}.init(aes::AES128, key), text);\n\tdefer free(cipher);\n\n\tassert(cipher == x\"3ad77bb40d7a3660a89ecaf32466ef97\");\n}\n\n```\n\n### Installation\n\nClone the repository with\n```git clone http://github.com/konimarti/aes.c3l```\nto the `./lib` folder of your C3 project and add the following to\n`project.json`:\n\n```json\n{\n    \"dependency-search-paths\": [ \"lib\" ],\n    \"dependencies\": [ \"aes\" ]\n}\n```\n\nIf you didn't clone it into the `lib` folder, adjust your\n`dependency-search-paths` accordingly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonimarti%2Faes.c3l","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonimarti%2Faes.c3l","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonimarti%2Faes.c3l/lists"}