Switched Hash() to using the libsodium libraries

Also switched random to being in the crypto libraries, for added
flexibility.