MCPcopy Index your code
hub / github.com/f0ng/autoDecoder / hexStringToByteArray

Method hexStringToByteArray

src/com/autoDecoder/util/codeEncode.java:115–123  ·  view source on GitHub ↗
(String hexString)

Source from the content-addressed store, hash-verified

113
114 // 将十六进制字符串转换为字节数组
115 public static byte[] hexStringToByteArray(String hexString) {
116 int len = hexString.length();
117 byte[] data = new byte[len / 2];
118 for (int i = 0; i < len; i += 2) {
119 data[i / 2] = (byte) ((Character.digit(hexString.charAt(i), 16) << 4)
120 + Character.digit(hexString.charAt(i+1), 16));
121 }
122 return data;
123 }
124
125
126

Callers 1

encryptKeyivmodeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected