def get_hmac(password):
 salt = _security.password_salt
 if (salt is None):
  raise RuntimeError(('The configuration value `SECURITY_PASSWORD_SALT` must not be None when the value of `SECURITY_PASSWORD_HASH` is set to "%s"' % _security.password_hash))
 h = hmac.new(encode_string(salt), encode_string(password), hashlib.sha512)
 return base64.b64encode(h.digest())

def get_hmac ( password ) : salt = _security . password_salt if ( salt is None ) : raise RuntimeError ( ( 'The configuration value `SECURITY_PASSWORD_SALT` must not be None when the value of `SECURITY_PASSWORD_HASH` is set to "%s"' % _security . password_hash ) ) h = hmac . new ( encode_string ( salt ) , encode_string ( password ) , hashlib . sha512 ) return base64 . b64encode ( h . digest ( ) )
returns a base64 encoded hmac+sha512 of the password signed with the salt specified by security_password_salt .