Search Results in /dev/blog/
Years ago while working through the framework of Hastymail, I came across a need to have a simple and fast lightweight encryption routine. At the time the mcrypt module of PHP was not so widely available as it is now, and I wanted something without external dependencies including PHP mods that were not default on most distros. RC4 is an older, lightweight encryption algorithm, by no means uncrackable, but suitable for certain encryption tasks in which limited overhead is required and cipher strength is not a top priority. So I wrote a simple RC4 implementation in PHP based on the by then widely available algorithm. It's a single function that takes two arguments, a string to encrypt/decrypt and a "secret key" that forms the basis of the encryption.
If elephants never forget, then I have mouse memory. As the years go by I strain at times to remember early childhood events. I do recall however a certain Christmas gift I received long ago, and when I consider how much fun I had with it I can't help but wax nostalgic. It was a book of ciphers and codes, and had instructions on how to create a multitude of substitution ciphers of varying difficulty. The excitement I felt when I scrawled an encoded message and rolled it up inside a hollowed out pen was not lessened in anyway by the fact that nobody would ever receive said encoded message, nor would anything happen when some time later the hollowed out pen was eventually fished out from the junk drawer to then be thrown away after the quick conclusion that it was broken. But heck, I was like 9 or something. When you are that age the day after tomorrow may as well be 50 years from now, and the reason for doing things need not make a whole lot of sense. At least when I was 9. As I reread this I can't help but think that my recollection of fond memories is coming out more pathetic than heartwarming, so lets jump to the present and get on with the post.