🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

amigohex

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amigohex

AmigoHex

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
3
-25%
Maintainers
1
Weekly downloads
 
Created
Source

AmigoHex

Converts hex strings to pronounceable words. This may be a good format to print for small identifiers or data that need to be pronounciated. For example, if we store the 0x476ffe as Base64, it may become something like hS_$, which is pronounced as "height uppercase ess underline dollar sign". With AmigoHex, the same hex becomes "kunizezi", which is much easier to say. That's all...

Usage

const ami = require("amigohex");

console.log(ami.hexToAmigo6("476ffe")); // "kunizezi"
console.log(ami.amigo6ToHex("kunizezi")); // "476ffe"

Specification

AmigoHex has two flavors, 6-bit and 8-bit per syllable. They use the following tables:

6-Bit

// Consonants:

0000 -> p
0001 -> b
0010 -> t
0011 -> d
0100 -> k
0101 -> g
0110 -> x
0111 -> j
1000 -> f
1001 -> v
1010 -> l
1011 -> r
1100 -> m
1101 -> n
1110 -> s
1111 -> z

// Vowels:

00 -> a
01 -> u
10 -> i
11 -> e

8-bit

// Consonants:

0000 -> p
0001 -> b
0010 -> t
0011 -> d
0100 -> k
0101 -> g
0110 -> sh
0111 -> j
1000 -> f
1001 -> v
1010 -> l
1011 -> r
1100 -> m
1101 -> y
1110 -> s
1111 -> z

// Vowels:

0000 -> a
0001 -> e
0010 -> i
0011 -> o
0100 -> u
0101 -> an
0110 -> en
0111 -> in
1000 -> un
1001 -> on
1010 -> ai
1011 -> ei
1100 -> oi
1101 -> ui
1110 -> aw
1111 -> ow

Why AmigoHex?

It was called DesuHex since it was inspired on Japanese grammar which consists of simple syllables without semi-vowels or codes. It offended some people on the internet, so I renamed it to AmigoHex, which means "friendly hex" in my mother language, which is the least offensive name I could think of. If that still offends a fellow Brazilian, please send me a letter on Correios.

FAQs

Package last updated on 16 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts