hash serial- and de-serialization