4 ms·
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.
by meowface 12y ago
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.
- TazeTSchnitzel 12y agoMapping each base64 char to one word seems rather inefficient. If you have a longer list of N swears (say 256 because it's the size of a byte, making encoding easier), you could produce a more efficient base-N encoding, e.g.: 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. :)
- meowface 12y agoYep, that would be a little better. I suppose you can't get much better than that unless you can come up with hundreds or thousands more swears.
- TazeTSchnitzel 12y agoWell, for some X there's always a base-2^X encoding you could use. If you can find 512 swears, you could do base-512. You don't actually have to do a base-2^X encoding, but that's more convenient as it means you're encoding X bits with each "digit". 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.
- mapmeldo 12y agoyes, originally I was thinking 256. Unfortunately it's difficult to reach 256 without adding hate/vitrol/racist language
- TazeTSchnitzel 12y agoAh, I see the problem. An awful lot of profanities are ethnic/racial/other minority slurs. Perhaps some foreign-language and more obscure (dialectal?) English swear words could be used? With crowd-sourcing I'm sure we could reach 256.
- mapmeldo 12y agoas it was, I needed to make a call for swears and look up some different dictionaries to fill up this project People are somewhat reluctant to share their profanity on GitHub
- TazeTSchnitzel 12y agoMake that call here and now on Hacker News, while this still has attention and is on the front page, and I'm sure you'll get contributions! I suggest putting at the top-level of this comments section, so it gets more attention.
- undrcvr-lagggal 12y ago> without adding hate/vitrol/racist language ...and yet it's full of misogynistic language.
- betenoire 12y agoadd filler words and turn them into sentences?