Allocate and deallocate C hash.

Allocate and deallocate the C hash from the C++ wrapper.

See #32.