Make robust error checking/error return codes
Currently some hash operations may silently fail and in general functions wrapping hash operations don't provide sufficient error messaging
Currently some hash operations may silently fail and in general functions wrapping hash operations don't provide sufficient error messaging