BYTE [] Convert high efficiency method or algorithm for 16-enveloped strings

zhaozj2021-02-16  74

Static char [] hexdigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A' , 'B', 'c', 'd', 'e', ​​'f'};

Public static string tohexstring (byte [] bytes) {char [] chars = new char [bytes.length * 2]; for (int i = 0; i > 4]; Chars [i * 2 1] = HEXDIGITS [B & 0xF];} Return New String (Chars);

转载请注明原文地址:https://www.9cbs.com/read-12278.html

New Post(0)