Package io.grpc.alts.internal
Class AltsTsiFrameProtector.Unprotector
- java.lang.Object
-
- io.grpc.alts.internal.AltsTsiFrameProtector.Unprotector
-
- Enclosing class:
- AltsTsiFrameProtector
static final class AltsTsiFrameProtector.Unprotector extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private ChannelCrypterNettycrypterprivate io.netty.buffer.ByteBuffirstFrameTagprivate io.netty.buffer.ByteBufheaderprivate intrequiredProtectedBytesprivate AltsTsiFrameProtector.DeframerStatestateprivate intsuffixBytesprivate java.util.List<io.netty.buffer.ByteBuf>unhandledBufsprivate longunhandledBytesprivate intunhandledIdx
-
Constructor Summary
Constructors Constructor Description Unprotector(ChannelCrypterNetty crypter, io.netty.buffer.ByteBufAllocator alloc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddUnhandled(io.netty.buffer.ByteBuf in)private voidclearState()private voiddecodeFrame(io.netty.buffer.ByteBufAllocator alloc, java.util.List<java.lang.Object> out)(package private) voiddestroy()private voidhandleHeader()private io.netty.buffer.ByteBufhandlePayload(io.netty.buffer.ByteBufAllocator alloc)(package private) voidunprotect(io.netty.buffer.ByteBuf in, java.util.List<java.lang.Object> out, io.netty.buffer.ByteBufAllocator alloc)
-
-
-
Field Detail
-
suffixBytes
private final int suffixBytes
-
crypter
private final ChannelCrypterNetty crypter
-
state
private AltsTsiFrameProtector.DeframerState state
-
requiredProtectedBytes
private int requiredProtectedBytes
-
header
private io.netty.buffer.ByteBuf header
-
firstFrameTag
private io.netty.buffer.ByteBuf firstFrameTag
-
unhandledIdx
private int unhandledIdx
-
unhandledBytes
private long unhandledBytes
-
unhandledBufs
private java.util.List<io.netty.buffer.ByteBuf> unhandledBufs
-
-
Constructor Detail
-
Unprotector
Unprotector(ChannelCrypterNetty crypter, io.netty.buffer.ByteBufAllocator alloc)
-
-
Method Detail
-
addUnhandled
private void addUnhandled(io.netty.buffer.ByteBuf in)
-
unprotect
void unprotect(io.netty.buffer.ByteBuf in, java.util.List<java.lang.Object> out, io.netty.buffer.ByteBufAllocator alloc) throws java.security.GeneralSecurityException- Throws:
java.security.GeneralSecurityException
-
decodeFrame
private void decodeFrame(io.netty.buffer.ByteBufAllocator alloc, java.util.List<java.lang.Object> out) throws java.security.GeneralSecurityException- Throws:
java.security.GeneralSecurityException
-
handleHeader
private void handleHeader()
-
handlePayload
private io.netty.buffer.ByteBuf handlePayload(io.netty.buffer.ByteBufAllocator alloc) throws java.security.GeneralSecurityException- Throws:
java.security.GeneralSecurityException
-
clearState
private void clearState()
-
destroy
void destroy()
-
-