You're probably not going to find one one simple example that has exactly what you are looking for. I think your best option is to just start making your own example and come back with specific questions when you run into trouble.
This article[
^] looks like a good overview about storing passwords. I thought it might help get you started.
Here is a tip/trick[
^] that might help, too.