Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ikcede/js-one-time-pad
A simple one-time pad class built in Javascript
https://github.com/ikcede/js-one-time-pad
crypto cryptography javascript
Last synced: 2 days ago
JSON representation
A simple one-time pad class built in Javascript
- Host: GitHub
- URL: https://github.com/ikcede/js-one-time-pad
- Owner: ikcede
- License: mit
- Created: 2024-03-07T07:26:54.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-03-07T08:48:57.000Z (9 months ago)
- Last Synced: 2024-03-07T09:52:03.514Z (9 months ago)
- Topics: crypto, cryptography, javascript
- Language: JavaScript
- Homepage: https://ikcede.github.io/JS-One-Time-Pad/
- Size: 849 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
JS-One-Time-Pad
===============A simple one-time pad class built in Javascript, cleaned up
from my 2014 version.Since there are 26 letters in the English alphabet, the encoder
needs to support at least 5 bits to represent each character.
The remaining 6 characters are set to commonly used characters,
and the ? is used as a catch-all for unsupported characters.```js
// Supported characters and their mapped values:
{
0: 'A', 1: 'B', 2: 'C', 3: 'D', 4: 'E', 5: 'F', 6: 'G', 7: 'H',
8: 'I', 9: 'J', 10: 'K', 11: 'L', 12: 'M', 13: 'N', 14: 'O',
15: 'P', 16: 'Q', 17: 'R', 18: 'S', 19: 'T', 20: 'U', 21: 'V',
22: 'W', 23: 'X', 24: 'Y', 25: 'Z', 26: '.', 27: ' ', 28: ',',
29: '\'', 30: '-', 31: '?'
}
```## Demo
See live demo [here](http://ikcede.github.io/JS-One-Time-Pad/).
![Screenshot](demo-assets/screenshot.png)