Added one-shot hashing function