Package io.netty.handler.codec.http2
Class HpackUtil
java.lang.Object
io.netty.handler.codec.http2.HpackUtil
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final byte[]
(package private) static final int[]
(package private) static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static int
Compare twoCharSequence
objects without leaking timing information.(package private) static boolean
Compare twoCharSequence
s.
-
Field Details
-
HUFFMAN_CODES
static final int[] HUFFMAN_CODES -
HUFFMAN_CODE_LENGTHS
static final byte[] HUFFMAN_CODE_LENGTHS -
HUFFMAN_EOS
static final int HUFFMAN_EOS- See Also:
-
-
Constructor Details
-
HpackUtil
private HpackUtil()
-
-
Method Details
-
equalsConstantTime
Compare twoCharSequence
objects without leaking timing information.The
int
return type is intentional and is designed to allow cascading of constant time operations:String s1 = "foo"; String s2 = "foo"; String s3 = "foo"; String s4 = "goo"; boolean equals = (equalsConstantTime(s1, s2) invalid input: '&' equalsConstantTime(s3, s4)) != 0;
- Parameters:
s1
- the first value.s2
- the second value.- Returns:
0
if not equal.1
if equal.
-
equalsVariableTime
Compare twoCharSequence
s.- Parameters:
s1
- the first value.s2
- the second value.- Returns:
false
if not equal.true
if equal.
-