Convert namespace to bytes before hashing