Lines Matching refs:buf

233     int encrypt(byte[] buf, int offset, int len) {
247 System.arraycopy(buf, offset,
248 buf, offset + prefix.length, len);
252 buf, offset, prefix.length);
257 len = addPadding(buf, offset, len, blockSize);
267 new ByteArrayInputStream(buf, offset, len),
271 int newLen = cipher.update(buf, offset, len, buf, offset);
312 byte[] buf = null;
316 buf = bb.array();
317 System.arraycopy(buf, arrayOffset + pos,
318 buf, arrayOffset + pos + prefix.length,
322 buf = new byte[limit - pos];
323 bb.get(buf, 0, limit - pos);
326 bb.put(buf);
396 int decrypt(byte[] buf, int offset, int len,
403 int newLen = cipher.update(buf, offset, len, buf, offset);
417 new ByteArrayInputStream(buf, offset, newLen),
424 buf, offset, newLen, tagLen, blockSize, protocolVersion);
432 System.arraycopy(buf, offset + blockSize,
433 buf, offset, newLen - blockSize);
503 byte[] buf = null;
507 buf = bb.array();
508 System.arraycopy(buf, arrayOffset + pos + blockSize,
509 buf, arrayOffset + pos, limit - pos - blockSize);
512 buf = new byte[limit - pos - blockSize];
514 bb.get(buf);
516 bb.put(buf);
533 private static int addPadding(byte[] buf, int offset, int len,
545 if (buf.length < (newlen + offset)) {
553 buf [offset++] = (byte) (pad - 1);
605 byte[] buf, int offset, int len, byte pad) {
616 if (buf[offset + j] != pad) {
667 private static int removePadding(byte[] buf, int offset, int len,
673 int padLen = buf[padOffset] & 0xFF;
682 checkPadding(buf, offset, len, (byte)(padLen & 0xFF));
688 int[] results = checkPadding(buf, offset + newLen,