byte[] keyof160bits = generate160BitKey(password, iterate, receivedsalt);
SecretKey keySpec = new SecretKeySpec(keyof160bits, "AES");
HmacSHA1 mac = new HmacSHA1();
mac.init(keySpec, keylength);
mac.update(data);
byte[] signature = mac.sign();
return MessageDigest.isEqual(receivedSignature,signature);
}