Lines Matching refs:offset
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);
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);
533 private static int addPadding(byte[] buf, int offset, int len,
545 if (buf.length < (newlen + offset)) {
552 for (i = 0, offset += len; i < pad; i++) {
553 buf [offset++] = (byte) (pad - 1);
567 int offset = bb.position();
582 bb.limit(newlen + offset);
587 for (i = 0, offset += len; i < pad; i++) {
588 bb.put(offset++, (byte) (pad - 1));
591 bb.position(offset);
592 bb.limit(offset);
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,
672 int padOffset = offset + len - 1;
682 checkPadding(buf, offset, len, (byte)(padLen & 0xFF));
688 int[] results = checkPadding(buf, offset + newLen,
714 int offset = bb.position();
717 int padOffset = offset + len - 1;
734 (ByteBuffer)bb.duplicate().position(offset + newLen),
753 bb.position(offset + newLen);
754 bb.limit(offset + newLen);