improved hashes and defended against replay