{"id":17774207,"url":"https://github.com/animesh-ghosh/crypt","last_synced_at":"2025-06-29T18:32:25.225Z","repository":{"id":105090887,"uuid":"257983434","full_name":"Animesh-Ghosh/Crypt","owner":"Animesh-Ghosh","description":"A WebAssembly toy project.","archived":false,"fork":false,"pushed_at":"2020-07-30T09:10:35.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T15:39:30.194Z","etag":null,"topics":["cipher","cipher-algorithms","cpp","cpp11","emscripten","make","makefile","webassembly"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Animesh-Ghosh.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":"2020-04-22T18:15:39.000Z","updated_at":"2022-01-21T09:06:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"1300c8b5-3391-4bc2-af7c-3d81ee4e0ea8","html_url":"https://github.com/Animesh-Ghosh/Crypt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Animesh-Ghosh/Crypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Animesh-Ghosh%2FCrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Animesh-Ghosh%2FCrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Animesh-Ghosh%2FCrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Animesh-Ghosh%2FCrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Animesh-Ghosh","download_url":"https://codeload.github.com/Animesh-Ghosh/Crypt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Animesh-Ghosh%2FCrypt/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262647155,"owners_count":23342601,"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":["cipher","cipher-algorithms","cpp","cpp11","emscripten","make","makefile","webassembly"],"created_at":"2024-10-26T21:50:01.713Z","updated_at":"2025-06-29T18:32:25.182Z","avatar_url":"https://github.com/Animesh-Ghosh.png","language":"C++","readme":"# Crypt\n\nA WebAssembly toy project.\n\nImplement cryptographic ciphers and use them in a web-app them to encrypt/decrypt simple texts.\n\n**Ciphers implemented currently cannot be used to decrypt a given cipher text. Currently only encrypting plain-text and getting back the plain-text works.**\n\n*Prerequisites: Need a C++11 compliant compiler (and related toolchain) and Emscripten toolchain. You can get the Emscripten toolchain from [here](https://github.com/emscripten-core/emsdk).*\n\n## Building and Running\n\nDeveloped using MinGW toolchain for native build. For WebAssembly, use emscripten (64-bit).\n\n**Native:**\n```pwsh\nmake\n```\n\n**WebAssembly:**\n1. Activate emscripten\n2. Run:\n```pwsh\nem++ --bind web-bindings.cpp ciphers.cpp -I. -std=c++11 -Wall -Wextra -pedantic -o ciphers.html\n```\n*Note: You can specify em++ to either generate only the JS file which loads the WASM module or you can use Emscripten's generated HTML.*\n\n3. Serve the output files and play around with the API in the browser (either Node or Python's http.server module works).\n\n**For Python:**\n```pwsh\npython -m http.server --bind 127.0.0.1\n```\n\n**JS API:**\n\nClasses are attached to the `Module` object. Refer to constructor declarations in `ciphers.hpp`. To use the classes:\n```js\nlet cipher = new Module.RailFence(\"come home\");\ncipher.Encrypt();  // \"cm oeoehm\"\ncipher.Decrypt();  // \"come home\"\n```\n\n**TODOs:**\n\n- [x] Create an interface (probably with Vue.js)\n- [x] Write some tests\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanimesh-ghosh%2Fcrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanimesh-ghosh%2Fcrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanimesh-ghosh%2Fcrypt/lists"}