来信大神,帮忙帮下面的JAVA代码转成c#代码
private static final String HEX_CHARS = "0123456789abcdef";
public static String toHexString(byte[] b) {
StringBuffer sb = new StringBuffer();
for (int i = 0; i < b.length; i++) {
sb.append(HexUtil.HEX_CHARS.charAt(b[i] >>> 4 & 0x0F));
sb.append(HexUtil.HEX_CHARS.charAt(b[i] & 0x0F));
}
return sb.toString();
}
相关分类