172173174175176177178179180181182
} private static void testLoop() throws Exception { Random random = new SecureRandom(); while (true) { runOneTest(random.nextInt()); } } private static Connection openConnection() throws Exception { Class.forName(DRIVER);
385386387388389390391392393394
* @return the random long value */ public static int secureRandomInt(int lowerThan) { SecureRandom sr = getSecureRandom(); synchronized (sr) { return sr.nextInt(lowerThan); } } }
232233234235236237238239240241242
sig.update(rawEphemeralPubkey); final byte[] rawSign = sig.sign(); final byte[] pad = new byte[random.nextInt(32)]; random.nextBytes(pad); putBytes( buffer, rawMyPubkey, 65535 );
251252253254255256257258259260261
if ( sharedSecret == null ){ throw( new CryptoManagerException( "phase error: keys not received" )); } final byte[] IV = new byte[20 + random.nextInt(32)]; random.nextBytes(IV); sig.update(IV);
11371138113911401141114211431144114511461147
SecureRandom random = new SecureRandom(); boolean[] added = new boolean[nodes.length]; List lookup = null; for (int i = 0; i < 10; i++) { int node = random.nextInt(nodes.length); if (added[node]) { if (node == 2) drm.remove("TEST"); else
12151216121712181219122012211222122312241225
boolean[] added = new boolean[nodes.length]; List lookup = null; List<ClusterNode> lookupReplicantsNodes = null; for (int i = 0; i < 10; i++) { int node = random.nextInt(nodes.length); if (added[node]) { if (node == 2) drm.remove("TEST"); else
289290291292293294295296297298299
SecureRandom random = new SecureRandom(); for (count = 0; count < LOOP_COUNT; count++) { deployer.deploy(key, "JGroups", listener); sleepThread(random.nextInt(50)); deployer.undeploy(key, listener); } } catch (Exception e) {
357358359360361362363364365366367
boolean[] added = new boolean[keys.length]; SecureRandom random = new SecureRandom(); for (count = 0; count < weightFactor * LOOP_COUNT; count++) { int pos = random.nextInt(keys.length); if (added[pos]) { drm._remove(keys[pos], nodeName); added[pos] = false; }
368369370371372373374375376377378
else { drm._add(keys[pos], nodeName, ""); added[pos] = true; } sleepThread(random.nextInt(30)); } } catch (Exception e) { e.printStackTrace();
3132333435363738394041
db.runWriteTransaction(new ISqlJetTransaction() { public Object run(SqlJetDb db) throws SqlJetException { try { t.insert(rnd.nextInt(2048), blob); } catch (SqlJetException e) { if (!SqlJetErrorCode.CONSTRAINT.equals(e.getErrorCode())) { throw e; } }