Encode key before hashing
Use a relative import for test_utils