{"id":15689274,"url":"https://github.com/littledivy/deno-ciphers","last_synced_at":"2026-05-08T14:09:56.795Z","repository":{"id":103501446,"uuid":"269007915","full_name":"littledivy/deno-ciphers","owner":"littledivy","description":"WASM module for Ciphers in Deno.","archived":false,"fork":false,"pushed_at":"2020-06-22T03:48:41.000Z","size":615,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T13:48:19.580Z","etag":null,"topics":["ciphers","deno","rust","secret","wasabi","wasm","wasm-pack"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/littledivy.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},"funding":{"github":"littledivy"}},"created_at":"2020-06-03T06:30:32.000Z","updated_at":"2021-04-20T16:15:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"303b90e0-8169-447c-9143-5156ab362ed9","html_url":"https://github.com/littledivy/deno-ciphers","commit_stats":{"total_commits":73,"total_committers":1,"mean_commits":73.0,"dds":0.0,"last_synced_commit":"5663d3811d731be57456e928b5c6a34c103035d2"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/littledivy%2Fdeno-ciphers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/littledivy%2Fdeno-ciphers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/littledivy%2Fdeno-ciphers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/littledivy%2Fdeno-ciphers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/littledivy","download_url":"https://codeload.github.com/littledivy/deno-ciphers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246314170,"owners_count":20757463,"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":["ciphers","deno","rust","secret","wasabi","wasm","wasm-pack"],"created_at":"2024-10-03T18:01:30.834Z","updated_at":"2026-05-08T14:09:51.766Z","avatar_url":"https://github.com/littledivy.png","language":"Rust","funding_links":["https://github.com/sponsors/littledivy"],"categories":[],"sub_categories":[],"readme":"# deno-ciphers\r\n\r\n[![stars](https://img.shields.io/github/stars/divy-work/deno-ciphers)](https://github.com/divy-work/deno-ciphers/stargazers)\r\n[![issues](https://img.shields.io/github/issues/divy-work/deno-ciphers)](https://github.com/divy-work/deno-ciphers/issues)\r\n![deno version](https://img.shields.io/badge/deno-1.0.3-success)\r\n[![vr scripts](https://badges.velociraptor.run/flat.svg)](https://velociraptor.run)\r\n\r\nEncipher and Decipher implementation for Deno.\r\n\r\n## Implementations\r\n\r\n- [x] Vigenere\r\n- [x] ADFGVX\r\n- [x] ADFGX\r\n- [x] Affine\r\n- [x] Atbash\r\n- [x] Autokey\r\n- [x] Beaufort\r\n- [x] Caesar\r\n- [x] ColumnarTransposition\r\n- [x] FourSquare\r\n- [x] FractionatedMourse\r\n- [ ] PlayFair\r\n- [x] PolybiusSqaure\r\n- [x] Porta\r\n- [x] RailFence\r\n- [x] Rot13\r\n- [x] RunningKey\r\n- [x] Substitution\r\n\r\n## Example\r\n\r\n```typescript\r\nimport { toVigenere, fromVigenere } from 'mod.ts';\r\n\r\ntoVigenere(\"key\", \"string\"); // \"CXPSRE\"\r\nfromVigenere(\"key\", \"CXPSRE\"); // \"string\"\r\n```\r\n\r\n#### Join Discord\r\n\r\n[![](https://discordapp.com/api/guilds/715564894904123424/widget.png?style=banner2)](https://discord.gg/uqywa4W)\r\n\r\n\r\n## Rules\r\n\r\n* __Vigenere__\r\n  * key should be alphabetic.\r\n\r\n* __ADFGVX__\r\n  * key \u003c 36 in length.\r\n  * key should not contain repeated chars.\r\n  * key and keyword should be a valid ascii.\r\n\r\n* __ADFGX__\r\n  * key \u003c 25 in length.\r\n  * key should not contain repeated chars.\r\n  * key and keyword should be a valid ascii.\r\n\r\n* __Affine__\r\n  * `a` should be in the range [1, 25].\r\n  * `b` should be in the range [1, 25].\r\n  * `a` should not be relatively prime to 26.\r\n\r\n* __Atbash__\r\n  * no rules\r\n\r\n* __AutoKey__\r\n  * key should be alphabetic.\r\n\r\n* __Beaufort__\r\n  * key should be alphabetic.\r\n\r\n* __Caesar__\r\n  * no rules\r\n\r\n* __ColumnarTransposition__\r\n  * key should be a valid ascii.\r\n\r\n* __FourSquare__\r\n  * alphabet, key1, key2 should be 25 chars in length.\r\n  * alphabet should be a valid ascii.\r\n  * alphabet, key1, key2 should not contain repeated chars.\r\n  * All of the chars in key1 and key2 should be in alphabet.\r\n  * pad should be contained in alphabet.\r\n\r\n* __Playfair__\r\n  * key should 25 chars in length.\r\n  * key should be a valid ascii.\r\n  * key should not contain repeated characters.\r\n  * pad should not be contained within key.\r\n\r\n* __PolybiusSqaure__\r\n  * key should be a valid ascii.\r\n  * key should not contain repeated characters.\r\n  * chars should be a valid ascii.\r\n  * chars should not contain repeated characters.\r\n  * length of chars should be equal to `sqrt(key.length())`, and key should be of length `chars.length()^2`.\r\n\r\n* __Porta__\r\n  * key should be alphabetic.\r\n\r\n* __RailFence__\r\n  * key should not be less than or equal to 0.\r\n\r\n* __RunningKey__\r\n  * key should be alphabetic.\r\n\r\n* __Substitution__\r\n  * key should be 26 characters in length.\r\n  * key should not contain repeated chars.\r\n  * key should be alphabetic.\r\n\r\n## Building from source\r\n\r\n### Prerequisites\r\n\r\n- [deno](https://deno.land/)\r\n- [rust](https://www.rust-lang.org/)\r\n- [wasm-pack](https://rustwasm.github.io/wasm-pack/)\r\n\r\n## Building\r\n```bash\r\n$ deno run -A scripts/build.ts\r\n```\r\n\r\n## Testing\r\n\r\nRequires `wasm.js` to be built first.\r\n\r\n```bash\r\n$ deno test\r\n```\r\n\r\n### Contribution\r\n\r\nPull request, issues and feedback are very welcome. Code style is formatted with `deno fmt` and commit messages are done following [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec.\r\n\r\n### Licence\r\n\r\nCopyright 2020, Divy Srivastava. All rights reserved. MIT license.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittledivy%2Fdeno-ciphers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flittledivy%2Fdeno-ciphers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flittledivy%2Fdeno-ciphers/lists"}