[Truffle] Move hash class into its own package.