We hash the password using pbkdf2. The actual code looks like this:
crypto.pbkdf2(text, salt, ITERATIONS, BYTES, function...
ITERATIONS is 1000, and BYTES is 32.
Our code is descended from the code on this page: http://www.thejoyofcode.com/Exploring_custom_identity_in_Mob...