protected void clear(byte[] bs) { if (bs != null) { Arrays.fill(bs, (byte)0); } }
private static byte[] genPad(byte b, int count) { byte[] padding = new byte[count]; Arrays.fill(padding, b); return padding; } }
public void reset() { Arrays.fill(state, 0L); state[0] = blockSize; inputBlocks = 0; bufOff = 0; }
private static void Clear(byte[] array) { if (array != null) { Arrays.fill(array, (byte)0); } }
private static void Clear(int[] array) { if (array != null) { Arrays.fill(array, 0); } }
private static void Clear(int[] array) { if (array != null) { Arrays.fill(array, 0); } }
private static byte[][] genSSL3Const() { int n = 10; byte[][] arr = new byte[n][]; for (int i = 0; i < n; i++) { byte[] b = new byte[i + 1]; Arrays.fill(b, (byte)('A' + i)); arr[i] = b; } return arr; }
/** * Clear the internals */ public void clear() { Arrays.fill(transcript, (byte)0); tOut.clear(); }
private void encodeValue(BigInteger n, BigInteger x, byte[] buf, int off, int len) { byte[] bs = checkValue(n, x).toByteArray(); int bsOff = Math.max(0, bs.length - len); int bsLen = bs.length - bsOff; int pos = len - bsLen; Arrays.fill(buf, off, off + pos, (byte)0); System.arraycopy(bs, bsOff, buf, off + pos, bsLen); } }
/** * reset the chaining vector back to the IV and reset the underlying * cipher. */ public void reset() { System.arraycopy(IV, 0, cfbV, 0, IV.length); Arrays.fill(inBuf, (byte)0); byteCount = 0; cipher.reset(); } }
protected byte[] engineGenerateSecret() throws IllegalStateException { byte[] rv = Arrays.clone(shared); Arrays.fill(shared, (byte)0); return rv; }
public void erase() { Arrays.fill(this.buf, (byte)0); reset(); } }
private void reset() { // Reset memory. for (int i = 0; i < memory.length; i++) { Block b = memory[i]; b.clear(); } memory = null; Arrays.fill(result, (byte)0); doInit(parameters); }
protected KeyParameter generateRecordMACKey(StreamCipher cipher) { byte[] firstBlock = new byte[64]; cipher.processBytes(firstBlock, 0, firstBlock.length, firstBlock, 0); KeyParameter macKey = new KeyParameter(firstBlock, 0, 32); Arrays.fill(firstBlock, (byte)0); return macKey; }
private static void updateMac(Mac mac, String string) { byte[] byteArray = Strings.toUTF8ByteArray(string); mac.update(byteArray, 0, byteArray.length); Arrays.fill(byteArray, (byte)0); }
private void processFilledBuffer(byte[] in, int inOff) { // copies into the block... for (int i = 0; i < _state.length; i++) { _block[i] = bytesToLongFromBuffer(_buffer, i * 8); } processBlock(); _bufferPos = 0; Arrays.fill(_buffer, (byte)0); }
public void reset() { Arrays.fill(b, 0L); engine.reset(); data.reset(); associatedText.reset(); if (initialAssociatedText != null) { processAADBytes(initialAssociatedText, 0, initialAssociatedText.length); } }
private static void updateDigestIncludingSize(Digest digest, BigInteger bigInteger) { byte[] byteArray = BigIntegers.asUnsignedByteArray(bigInteger); digest.update(intToByteArray(byteArray.length), 0, 4); digest.update(byteArray, 0, byteArray.length); Arrays.fill(byteArray, (byte)0); }
private static void updateDigestIncludingSize(Digest digest, BigInteger bigInteger) { byte[] byteArray = BigIntegers.asUnsignedByteArray(bigInteger); digest.update(intToByteArray(byteArray.length), 0, 4); digest.update(byteArray, 0, byteArray.length); Arrays.fill(byteArray, (byte)0); }