title: Secure Random hex digits only
body: <p>Trying to generate random digits with SecureRandom class of rails. Can we create a random number with SecureRandom.hex which includes only digits and no alphabets.</p>
  
  <p>For example:</p>
  
  <p>Instead of</p>
  
  <pre><code>SecureRandom.hex(4)
  =&gt; "95bf7267"
  </code></pre>
  
  <p>It should give</p>
  
  <pre><code>SecureRandom.hex(4)
  =&gt; "95237267"
  </code></pre>