def HashPassword(password, salt):
 prf = (lambda p, s: HMAC.new(p, s, SHA512).digest())
 return base64.b64encode(PBKDF2(escape.utf8(password), base64.b64decode(salt), count=1000, prf=prf))

def HashPassword ( password , salt ) : prf = ( lambda p , s : HMAC . new ( p , s , SHA512 ) . digest ( ) ) return base64 . b64encode ( PBKDF2 ( escape . utf8 ( password ) , base64 . b64decode ( salt ) , count = 1000 , prf = prf ) )
computes the hash of the given password using 1000 sha512 iterations .