### Question:
Crypto { public static String getRandomDigits(int len) { byte[] random = getRandomBytes(len); StringBuilder out = new StringBuilder(len); for (int i = 0; i < len; ++i) { out.append(DIGITS[Math.abs(random[i] % DIGITS.length)]); } return out.toString(); } private  Crypto(); static String getRandomString(int numBytes); static String getRandomDigits(int len); static byte[] getRandomBytes(int numBytes); static byte[] hmacSha(byte[] key, byte[] in); static byte[] hmacSha(byte[] key, byte[] in, String hmacType); static void hmacShaVerify(byte[] key, byte[] in, byte[] expected,
      String hmacType); static void hmacShaVerify(byte[] key, byte[] in, byte[] expected); static byte[] aes128cbcEncrypt(byte[] key, byte[] plain); static byte[] aes128cbcEncryptWithIV(byte[] key, byte[] iv, byte[] plain); static byte[] aes128cbcDecrypt(byte[] key, byte[] cipherText); static byte[] aes128cbcDecryptWithIv(byte[] key, byte[] iv,
      byte[] cipherText, int offset); static final SecureRandom RAND; final static int CIPHER_KEY_LEN; static int HMAC_SHA_LEN; }### Answer:
@Test public void testRandomDigits() throws Exception { Pattern digitPattern = Pattern.compile("^\\d+$"); String digits = Crypto.getRandomDigits(100); assertEquals(100, digits.length()); assertTrue("Should be only digits: " + digits, digitPattern.matcher(digits).matches()); }