Commit 4d5ca41b authored by yanzg's avatar yanzg

消除成功接收处理

parent 95ec0538
...@@ -746,8 +746,9 @@ public class StringHelper { ...@@ -746,8 +746,9 @@ public class StringHelper {
StringBuilder hex = new StringBuilder(hash.length * 2); StringBuilder hex = new StringBuilder(hash.length * 2);
for (byte b : hash) { for (byte b : hash) {
if ((b & 0xFF) < 0x10) if ((b & 0xFF) < 0x10) {
hex.append("0"); hex.append("0");
}
hex.append(Integer.toHexString(b & 0xFF)); hex.append(Integer.toHexString(b & 0xFF));
} }
return hex.toString(); return hex.toString();
...@@ -773,10 +774,12 @@ public class StringHelper { ...@@ -773,10 +774,12 @@ public class StringHelper {
StringBuilder buf = new StringBuilder(); StringBuilder buf = new StringBuilder();
for (int offset = 0; offset < b.length; offset++) { for (int offset = 0; offset < b.length; offset++) {
i = b[offset]; i = b[offset];
if (i < 0) if (i < 0) {
i += 256; i += 256;
if (i < 16) }
if (i < 16) {
buf.append("0"); buf.append("0");
}
buf.append(Integer.toHexString(i)); buf.append(Integer.toHexString(i));
} }
to = buf.toString(); to = buf.toString();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment