franbac
v1.3.0
Published
tiny utility to decode bacon cipher texts
Downloads
1
Readme
franbac 🥓
helps encode/decode strings that use two different characters to represent A's and B's. more info about the bacon cipher here
it will try to decode with letter 1 = A and letter 2 = A. if one of those decoded texts results in an invalid plaintext, it will discard it. it will try with the default alphabet and the alternate alphabet (both are in that wikipedia page).
install + use
easist to use npx
to run on-demand
decode
franbac decode <ciphertext>
$ npx franbac decode aaaaaaaaabaaaba
ABC
decode emojis
$ npx franbac decode 🌸🌿🌸🌿🌿🌿🌸🌿🌿🌸🌿🌸🌸🌸🌿🌿🌸🌸🌿🌿🌸🌿🌿🌸🌸🌸🌸🌸🌸🌸🌸🌿🌿🌸🌸🌸🌸🌸🌿🌿🌿🌸🌸🌸🌿🌿🌸🌸🌿🌸🌸🌸🌸🌸🌸🌿🌸🌸🌸🌸🌿🌸🌸🌸🌿
MYSVNANDSTARS
encode
franbac encode <a> <b> <plaintext>
$ npx franbac encode t s hello world
ttsssttstttststtststtsstsststttsstsstttttststtttss
encode emojis
$ npx franbac encode 🥓 🎉 hello world
🥓🥓🎉🎉🎉🥓🥓🎉🥓🥓🥓🎉🥓🎉🥓🥓🎉🥓🎉🥓🥓🎉🎉🥓🎉🎉🥓🎉🥓🥓🥓🎉🎉🥓🎉🎉🥓🥓🥓🥓🥓🎉🥓🎉🥓🥓🥓🥓🎉🎉
files
encoding: franbac file encode <a> <b> <filename>
decoding: franbac file decode <filename>
encode and decode file
$ echo "hello world" > helloworld.txt
$ npx franbac file encode 6 9 helloworld.txt > helloworld.enc
$ cat helloworld.enc
66999669666969669696699699696669969966666969666699
$ npx franbac file decode helloworld.enc
HELLOWORLD
roadmap
- [x] support decoding
- [x] support encoding given A and B substitutions
- [x] support encoding/decoding a file
license
MIT