This is my collection of various cryptographic techniques implemented in various languages. The idea is for these to be simple and thoroughly commented, with a document explaining how they work, so that you can learn how the magic of cryptography actually isn't really all that difficult to understand. They're certainly not intended for production use. There are lots of better pre-existing libraries for that.
Documentation is in here, as well as on my scribd account:
I also have these tutorials on my blog: