/emoji256

Base256 encoding with emoji

Primary LanguageRust

emoji256

Build Status Build status

This is a super-simple program that implements a base256 encoding using emoji. It will encode anything passed to it on standard input, and write the output to standard output. The current emoji table is as follows:

๐Ÿ‘๐Ÿ‘Ž๐Ÿ‘ŠโœŒโœ‹๐Ÿ‘Œ๐Ÿ‘๐Ÿ‘‹๐Ÿ‘†๐Ÿ‘‡๐Ÿ‘ˆ๐Ÿ‘‰โœ๐Ÿ‘๐Ÿ‘‚๐Ÿ‘ƒ
๐Ÿ‘ฃ๐Ÿค–โŒโž•โž–โž—โœ”โ—โ“โ‰๐ŸŽŒ๐Ÿ’ฏ๐Ÿ’‹๐Ÿ’๐Ÿ’Žโค
๐ŸŽธ๐ŸŽท๐ŸŽน๐ŸŽป๐Ÿˆ๐Ÿ€โšฝโšพ๐Ÿ†๐Ÿ๐Ÿน๐Ÿ…๐Ÿโ˜๐ŸŒช๐ŸŒง
๐ŸŒฉโžฐ๐Ÿ”๐Ÿง๐Ÿ‹๐Ÿฆ€๐Ÿ’๐Ÿ‘๐Ÿ๐ŸŽ๐Ÿ˜๐Ÿ™๐Ÿข๐Ÿ๐Ÿ–๐ŸŠ
๐Ÿ๐Ÿ„๐Ÿฆ๐ŸŒ๐Ÿซ๐Ÿฌ๐Ÿ‰๐Ÿ•ท๐Ÿ•ธ๐Ÿˆ๐Ÿ‡๐Ÿœ๐ŸŸ๐Ÿฃ๐Ÿจ๐Ÿฉ
๐Ÿช๐Ÿซ๐Ÿญ๐Ÿ”๐Ÿ•๐Ÿž๐ŸŽ‚๐ŸŒฎ๐ŸŒญ๐Ÿง€๐Ÿ™๐Ÿ๐Ÿฟ๐ŸŽ๐Ÿ๐ŸŒ
๐Ÿ‡๐Ÿ‰๐Ÿ’๐Ÿ“๐ŸŠ๐Ÿ‹๐Ÿ‘๐Ÿ๐Ÿ„๐Ÿ…๐Ÿ†๐ŸŒถ๐ŸŒฝ๐Ÿท๐Ÿบโ˜•
๐Ÿธ๐Ÿพ๐ŸŽƒ๐ŸŽ„๐ŸŽ…๐ŸŽโ˜ƒโ„โŒšโŒ›โฐโ˜Ž๐ŸŽˆ๐ŸŽ‰๐ŸŽŠ๐ŸŽ†
๐Ÿ‘ป๐Ÿ’€๐Ÿ‘ฟ๐Ÿ‘ฝโ˜€๐ŸŒˆ๐ŸŒ™โ˜”โญ๐ŸŒต๐ŸŒน๐ŸŒป๐Ÿ€๐Ÿ๐ŸŒฑ๐ŸŒด
๐Ÿ’„๐Ÿ’…๐ŸŽฉ๐ŸŽค๐ŸŽฅ๐ŸŽจ๐ŸŽฒโš ๐Ÿ“ท๐Ÿ’ฐ๐Ÿ’ณ๐Ÿ’ฒโ™ โ™ฃโ™ฅโ™ฆ
๐Ÿš€๐Ÿš’๐Ÿš—๐Ÿšข๐Ÿšซ๐Ÿšฒ๐Ÿšœ๐Ÿšโœˆ๐Ÿšฆ๐Ÿ’พ๐Ÿ’ฟ๐Ÿ“ก๐Ÿ“–๐Ÿ“…๐Ÿ“‹
๐Ÿ“Ž๐Ÿ“๐Ÿ“Œโœโœ‚๐Ÿ”๐Ÿ”‘๐Ÿ”’๐Ÿ”ช๐Ÿ”ซ๐Ÿ”ง๐Ÿ”จ๐Ÿด๐Ÿ”ฅ๐Ÿ’ฃ๐Ÿšฌ
๐Ÿ‘ ๐Ÿ‘Ÿ๐Ÿ‘•๐Ÿ‘–๐Ÿ‘™๐Ÿ‘—๐Ÿ‘”๐Ÿ‘‘๐Ÿ‘“๐Ÿ‘œ๐Ÿ’ฉ๐Ÿšฝ๐Ÿšฟ๐Ÿ›€๐ŸŽ“๐ŸŒ‹
โ›ช๐Ÿ†—๐ŸŽ€๐Ÿ’Š๐Ÿ’‰๐Ÿ””๐Ÿ”ฌ๐Ÿ•ฏโ—€โ–ถโฌ…โฌ†โฌ‡โ†—โ†–โ†˜
โ†™โ†ฉโ†ช๐Ÿ”„โฉโชโซโฌโธโœจโ˜ฎโ˜ขโ˜ฏโœกโš“โš™
๐ŸŽข๐ŸŽก๐ŸŽช๐Ÿšฉ๐ŸŽฌ๐ŸŽฎ๐ŸŽฐ๐ŸŽฑ๐ŸŽต๐ŸŽบ๐ŸŽฟ๐Ÿ‹๐Ÿญ๐Ÿ‘…๐Ÿ‘€๐Ÿ‘ฏ

Example

$ echo 'my string' | cargo run
๐ŸทโŒ›๐ŸŽธ๐ŸŽ„๐ŸŽ…๐ŸŽƒ๐Ÿ…๐Ÿบ๐Ÿ๐Ÿ‘ˆ

Some possible real-world uses of this could include:

SSH Key Validation

$ ssh-keygen -E sha256 -l -f ~/.ssh/id_main_rsa | awk -F'[ :]' '{print $3}' | base64 -d | emoji256
โญ๐Ÿ‘ฟ๐Ÿช๐Ÿ“‹โœˆโœ”โœ”๐ŸŽ๐ŸŽŠ๐Ÿžโ†ช๐Ÿ“ทโ˜”๐Ÿ’ฃ๐Ÿ”‘๐Ÿ‹๐Ÿ‘€๐Ÿช๐Ÿธ๐Ÿชโœ‚๐ŸŽปโ†˜๐ŸŒฎ๐ŸŒฝ๐ŸŽฅ๐Ÿ’ณ๐Ÿšฝโ†ชโฐ๐ŸซโŒ›

Hash Comparison

$ sha256sum Cargo.toml | cut -d' ' -f1 | xxd -r -p | emoji256
๐Ÿค–๐ŸŠ๐Ÿขโ†ฉ๐Ÿ•ธ๐ŸŸโ™ฃโ˜€โ†™๐Ÿ„โฌ…๐Ÿธ๐Ÿ‘ฏโฐ๐Ÿ‘‘โœ‚๐Ÿ”๐Ÿ…๐ŸŽฐโ“๐Ÿ‰๐Ÿ“๐ŸŒต๐Ÿˆโค๐ŸŽ‚๐ŸŒฎ๐ŸŽˆโ›ช๐Ÿ‘‡๐Ÿ”ง๐ŸŽ‚

GPG Key Fingerprints

$ gpg --list-keys --with-colons pacman@localhost | grep '^fpr' | cut -d':' -f10 | xxd -r -p | emoji256
๐Ÿญ๐Ÿฆโ˜•๐Ÿโœ๐ŸŽ๐Ÿ‘ฃโœ”โ—€๐ŸŽ‚๐Ÿ’…๐ŸŽŠ๐ŸŒด๐Ÿโž–๐ŸŒฝ๐Ÿฃ๐ŸŽ“โ™ฆ๐Ÿ