MCPcopy Index your code
hub / github.com/apache/tomcat / toHexString

Method toHexString

java/org/apache/tomcat/util/buf/HexUtils.java:97–108  ·  view source on GitHub ↗

Convert a character to a hexadecimal string representation. @param c the character to convert @return the hexadecimal string representation of the character

(char c)

Source from the content-addressed store, hash-verified

95 * @return the hexadecimal string representation of the character
96 */
97 public static String toHexString(char c) {
98 // 2 bytes / 4 hex digits
99 StringBuilder sb = new StringBuilder(4);
100
101 sb.append(hex[(c & 0xf000) >> 12]);
102 sb.append(hex[(c & 0x0f00) >> 8]);
103
104 sb.append(hex[(c & 0xf0) >> 4]);
105 sb.append(hex[(c & 0x0f)]);
106
107 return sb.toString();
108 }
109
110
111 /**

Callers 15

testRoundTrip01Method · 0.95
testRoundTrip02Method · 0.95
testToHex01Method · 0.95
inputsMethod · 0.95
digestA1Method · 0.95
TesterRunnableClass · 0.95
buildDigestResponseMethod · 0.95
digestMethod · 0.95
digestMethod · 0.95

Calls 2

toStringMethod · 0.65
appendMethod · 0.45

Tested by 15

testRoundTrip01Method · 0.76
testRoundTrip02Method · 0.76
testToHex01Method · 0.76
inputsMethod · 0.76
digestA1Method · 0.76
buildDigestResponseMethod · 0.76
digestMethod · 0.76
digestMethod · 0.76
digestMethod · 0.76