http://www.vbforums.com/showthread.php?t=368001
Thats to the "Unbreakable" code, it would need alot of modifying to work for your needs, but the principals of unbreakable code are there.

Also, do a quick search of the codebank for "encryption" you should get many results