replacing hash_string function with nacl implementation