Skip to content

Commit 99e6f1a

Browse files
author
mizvyt
committed
Initial commit
0 parents  commit 99e6f1a

9 files changed

+855
-0
lines changed

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Built files
2+
/dist
3+
/lib
4+
5+
# Dependencies
6+
node_modules

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Vytautas Mizgiris and others
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# RFC1751.js
2+
3+
An implementation of RFC1751 convention in TypeScript / JavaScript.
4+
5+
Converts between 128-bit strings and a human-readable
6+
sequence of words, as defined in RFC1751: "A Convention for
7+
Human-Readable 128-bit Keys", by Daniel L. McDonald:
8+
https://tools.ietf.org/html/rfc1751
9+
10+
## Source implementation
11+
12+
rfc1751.js @ ms-brainwallet.github.io (public domain)
13+
(https://github.com/ms-brainwallet/ms-brainwallet.github.io/blob/master/js/rfc1751.js)
14+
15+
rfc1751.py @ Python Cryptography Toolkit, written by Andrew M. Kuchling and others (public domain)
16+
(https://github.com/dlitz/pycrypto/blob/master/lib/Crypto/Util/RFC1751.py)
17+
18+
## Installation
19+
20+
```
21+
npm install rfc1751.js
22+
```
23+
24+
## Usage
25+
26+
``` javascript
27+
import { btoe, etob } from 'rfc1751.js';
28+
29+
// Convert bytes to words
30+
let bytearray = new Uint8Array([4, 8, 15, 16, 23, 42, 0, 0]);
31+
let words = btoe(bytearray);
32+
33+
// Convert words to bytes
34+
let decoded = etob(words);
35+
```
36+
37+
## License
38+
39+
It is licensed under MIT license.

package-lock.json

+311
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)