throw new LimitReachedException();
throw new Error(x.getMessage());
/** * <p>Returns a designated number of bytes suitable for use in the SASL SRP * mechanism.</p> * * @param length the number of bytes needed. * @return a byte array containing the generated/selected bytes. */ public synchronized byte[] derive(final int length) { final byte[] result = new byte[length]; // if (keyMaterial == null || length > keyMaterial.length) { try { umac.nextBytes(result, 0, length); } catch (IllegalStateException x) { // should not happen x.printStackTrace(System.err); } catch (LimitReachedException x) { // idem x.printStackTrace(System.err); } // } else { // System.arraycopy(keyMaterial, 0, result, 0, length); // } return result; } }
kdf.nextBytes(dk, 0, len); } catch (LimitReachedException lre) { throw new IllegalArgumentException(lre.toString());
kdf.nextBytes(iv, 0, blockSize); } catch (LimitReachedException shouldNotHappen) { throw new Error(shouldNotHappen.toString());
throw new RuntimeException(String.valueOf(x)); } catch (LimitReachedException x) { x.printStackTrace(System.err); throw new RuntimeException(String.valueOf(x));
public void fillBlock() throws LimitReachedException { if (++count > ((1L << 32) - 1)) { throw new LimitReachedException(); } // for (int i = 0; i < buffer.length; i++) { // buffer[i] = 0; // } Arrays.fill(buffer, (byte) 0x00); int limit = salt.length; // in = new byte[salt.length + 4]; in = new byte[limit + 4]; System.arraycopy(salt, 0, in, 0, salt.length); // in[salt.length ] = (byte)(count >>> 24); // in[salt.length+1] = (byte)(count >>> 16); // in[salt.length+2] = (byte)(count >>> 8); // in[salt.length+3] = (byte) count; in[limit++] = (byte)(count >>> 24); in[limit++] = (byte)(count >>> 16); in[limit++] = (byte)(count >>> 8); in[limit ] = (byte) count; for (int i = 0; i < iterationCount; i++) { mac.reset(); mac.update(in, 0, in.length); in = mac.digest(); for (int j = 0; j < buffer.length; j++) { buffer[j] ^= in[j]; } } } }
kdf.nextBytes(dk, 0, keylen); } catch (LimitReachedException shouldNotHappen) { throw new Error(shouldNotHappen.toString());
kdf1.nextBytes(L1Key, 0, L1Key.length); } catch (LimitReachedException x) { x.printStackTrace(System.err); throw new RuntimeException("KDF for L1Key reached limit"); kdf2.nextBytes(k2, 0, 24); } catch (LimitReachedException x) { x.printStackTrace(System.err); throw new RuntimeException("KDF for L2Key reached limit"); kdf3.nextBytes(k31, 0, 64); } catch (LimitReachedException x) { x.printStackTrace(System.err); throw new RuntimeException("KDF for L3Key1 reached limit"); kdf4.nextBytes(k32, 0, 4); } catch (LimitReachedException x) { x.printStackTrace(System.err); throw new RuntimeException("KDF for L3Key2 reached limit");
throws LimitReachedException, InvalidKeyException { if (ndx.compareTo(maxIndex) > 0) { throw new LimitReachedException();