/**
 * Calculate HMAC for password in given form.
 *
 * @author Jan Sychra
 * @date 2007-01-27 - 2009-11-04
 *
 * @param frm reference to given form
 */
function hashPassword(frm)
{
	frm['password_hash'].value = hex_hmac_md5(hex_md5(frm['password'].value), frm['key'].value);

	// unencrypted password has not to be sent
	frm['password'].value = 'NULL';
}

