As far as I can tell, this is mapping each base64 character of the encrypted blob to one full word? This will obviously multiply the message size a great deal.
var bytes = atob(base64msg),
swearsMsg = '';
for (var i = 0; i < bytes.length; i++) {
newMsg += swears[bytes[i].charAt(0)] + ' ';
}
Of course, it's still less efficient than base64, but it's an improvement. :)I suppose you can't get much better than that unless you can come up with hundreds or thousands more swears.
But yeah, I'm not sure there are that many recognisable swear words in English. Unless you count massive compounds, but now all your words are really long, so you haven't gained anything.
Perhaps some foreign-language and more obscure (dialectal?) English swear words could be used? With crowd-sourcing I'm sure we could reach 256.
People are somewhat reluctant to share their profanity on GitHub
I suggest putting at the top-level of this comments section, so it gets more attention.