I just posted a detailed post on How to store user passwords using variable length random salt bytes with secure SHA512 cryptographic hashing functions on my programming interviews blog at http://www.programminginterviews.info/