Home
last modified time | relevance | path

Searched refs:protectedBuf (Results 1 – 2 of 2) sorted by relevance

/external/grpc-grpc-java/alts/src/test/java/io/grpc/alts/internal/
DAltsTsiFrameProtectorTest.java368 ByteBuf protectedBuf = in parseFrame_twoFramesNoFragment_Leftover() local
375 protectedBuf.writeIntLE( in parseFrame_twoFramesNoFragment_Leftover()
379 protectedBuf.writeIntLE(6); in parseFrame_twoFramesNoFragment_Leftover()
381 ByteBuf frameOut1 = writeSlice(protectedBuf, payloadBytes1 + FakeChannelCrypter.getTagBytes()); in parseFrame_twoFramesNoFragment_Leftover()
383 protectedBuf.writeIntLE( in parseFrame_twoFramesNoFragment_Leftover()
387 protectedBuf.writeIntLE(6); in parseFrame_twoFramesNoFragment_Leftover()
389 ByteBuf frameOut2 = writeSlice(protectedBuf, payloadBytes2 + FakeChannelCrypter.getTagBytes()); in parseFrame_twoFramesNoFragment_Leftover()
392 protectedBuf.writeIntLE((byte) -1); in parseFrame_twoFramesNoFragment_Leftover()
398 unprotector.unprotect(protectedBuf, out, alloc); in parseFrame_twoFramesNoFragment_Leftover()
404 assertThat(protectedBuf.readableBytes()).isEqualTo(0); in parseFrame_twoFramesNoFragment_Leftover()
[all …]
/external/grpc-grpc-java/alts/src/main/java/io/grpc/alts/internal/
DAltsTsiFrameProtector.java118 ByteBuf protectedBuf; in protectFlush() local
120 protectedBuf = handleUnprotected(unprotectedBufs, alloc); in protectFlush()
126 if (protectedBuf != null) { in protectFlush()
127 ctxWrite.accept(protectedBuf); in protectFlush()
150 ByteBuf protectedBuf = alloc.directBuffer(Ints.checkedCast(protectedBytes)); in handleUnprotected() local
157 protectedBuf.writeIntLE(unprotectedBytesLeft + HEADER_TYPE_FIELD_BYTES + suffixBytes); in handleUnprotected()
158 protectedBuf.writeIntLE(HEADER_TYPE_DEFAULT); in handleUnprotected()
161 ByteBuf frameOut = writeSlice(protectedBuf, unprotectedBytesLeft + suffixBytes); in handleUnprotected()
180 protectedBuf.readerIndex(0); in handleUnprotected()
181 protectedBuf.writerIndex(protectedBuf.capacity()); in handleUnprotected()
[all …]