3 ms·
Bonus points for not just creating an image, but hiding the code steganographically in an existing image (ie only using the LSB of each pixel to hide code)!
by maebert 14y ago
Bonus points for not just creating an image, but hiding the code steganographically in an existing image (ie only using the LSB of each pixel to hide code)!
- TazeTSchnitzel 14y agoThis might be quite effective in preventing people trying to reveal your code as part of their job. You could use some sort of obscene image to hide your code in.
- borplk 14y agoBut at some point you need to have the code on client side to get the code in string format, doesn't that give away how you've stored the code in the image?
- barefoot 14y agoComments should make it fairly straightforward to accomplish: function foo() { /* ...characters for image data... / bar(); / ...more image data... */ The asterisks are not showing up but you get the idea. It checks out with the comments part of the javascript spec as well: http://ecma-international.org/ecma-262/5.1/#sec-7.4 http://ecma-international.org/ecma-262/5.1/#sec-7.4 ...as the text inside the comment can be any unicode code unit except for an asterisk (For source Character rules see http://ecma-international.org/ecma-262/5.1/#sec-6 http://ecma-international.org/ecma-262/5.1/#sec-6).
- sp332 14y agoIf you want asterisks to show up, * put a space on both sides. If you want to do something *f*a*n*c*y* put two spaces at the front of the line, it will show up verbatim including line breaks.
- majmun 14y agobonus points for hiding data in existing image without modifying it.