I'm not looking necessarily for implementations in any language (although it would help to list those resources as well), but what I am most interested in is a discussion of what advantages and disadvantages certain encryption methods have when applied to a given scenario. Just for a frame of reference:
- I want a user to enter a username/password that will be stored in a database.
- I want to encrypt a PDF file and send it to a friend and have her decrypt it.
- I need to encrypt a small amount of plain text and have someone else decrypt it.
I'm sure there are better examples, and there is sure to be some crossover, but it seems like much of the time spent on encryption is deciding what is the best method given the variables or scenario involved. Is it a one way hash? Do others need to decrypt it? Am I the only one to decrypt it? Is it binary or text? Are there file size limits? Is it stored, or sent over a network?