Allow empty data in calculateHash