Move error checking and salt generation into a sub-function, preparing to split hash() out into different functions. Remove call to anyNA, which isn't present <= R3.0.2, to avoid artificially limiting the acceptable R versions for this library.