Add encrypted nonce generation strategy.

Refactor NonceUtil to use generator classes where possible.