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 intCompare twoCharSequenceobjects without leaking timing information.(package private) static booleanCompare twoCharSequences.
-
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 twoCharSequenceobjects without leaking timing information.The
intreturn 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:
0if not equal.1if equal.
-
equalsVariableTime
Compare twoCharSequences.- Parameters:
s1- the first value.s2- the second value.- Returns:
falseif not equal.trueif equal.
-