Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mbrubeck/mnemonic.js
Mnemonic encoding of binary data, based on Oren Tirosh's mnemonic.c
https://github.com/mbrubeck/mnemonic.js
Last synced: about 2 months ago
JSON representation
Mnemonic encoding of binary data, based on Oren Tirosh's mnemonic.c
- Host: GitHub
- URL: https://github.com/mbrubeck/mnemonic.js
- Owner: mbrubeck
- Created: 2014-03-08T00:03:45.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2022-04-16T21:08:18.000Z (over 2 years ago)
- Last Synced: 2023-04-09T21:41:28.447Z (over 1 year ago)
- Language: JavaScript
- Size: 152 KB
- Stars: 30
- Watchers: 4
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
This is a direct JavaScript port of the mnemonic encoder originally written
in C by Oren Tirosh and available from:https://github.com/singpolyma/mnemonicode
These routines implement a method for encoding binary data into a sequence
of words which can be spoken over the phone, for example, and converted
back to data on the other side.For more information, see:
http://web.archive.org/web/20101031205747/http://www.tothink.com/mnemonic/
Example usage:
>>> mnemonic.encode([101, 2, 240, 6, 108, 11, 20, 97])
"digital-apollo-aroma--rival-artist-rebel">>> mnemonic.encode([101, 2, 240, 6, 108, 11, 20, 97], "x/x/x - ")
"digital/apollo/aroma - rival/artist/rebel">>> mnemonic.decode("digital.apollo.aroma.rival.artist.rebel")
[101, 2, 240, 6, 108, 11, 20, 97]>>> mnemonic.encode_int32(438871)
"judo-fluid-jet">>> mnemonic.decode_int32("judo-fluid-jet")
438871Available under the MIT license.