Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/privacyforge/bitphrase

Encode and Decode Bytes to Meaningful Word
https://github.com/privacyforge/bitphrase

Last synced: 7 days ago
JSON representation

Encode and Decode Bytes to Meaningful Word

Awesome Lists containing this project

README

        

# ByteWorder.js

Encode and Decode Bytes to Meaningful Word

## Encode

```js
const encoded = encodeUint8ArrayToWord(
new Uint8Array([2, 23, 43, 123, 2, 23, 42, 12, 34, 10, 98, 7])
);
console.log(encoded); // عاقبت مهر نر خدایی جهانبان تونیک تبرک
```

## Decode

```js
const encoded = "عاقبت مهر نر خدایی جهانبان تونیک تبرک";
const decoded = decodeWordToUint8Array(encoded);
console.log(decoded); // [2, 23, 43, 123, 2, 23, 42, 12, 34, 10, 98, 7]
```