Depend on an abstraction of SecureRandom.

Per a PR comment by @heathd let's depend on an abstraction rather than
secureRandom itself.