public static string GetHexStringFromBytes(byte[] bytes, HashAlgorithm hashAlgorithm) { var hashBytes = hashAlgorithm.ComputeHash(bytes); var hashString = ByteArrayToHexConverter.ByteArrayToHexViaLookupPerByte(hashBytes); return(hashString); }
private void PrintMd5Bytes(byte[] bytes, string encoding) { var md5Bytes = MD5.Create().ComputeHash(bytes); var md5Hex = ByteArrayToHexConverter.ByteArrayToHexViaLookupPerByte(md5Bytes); Console.WriteLine($"{encoding,-7}: {md5Hex}"); }
private void PrintBytes(byte[] bytes, string encoding) { Console.WriteLine($"{encoding,-7}: {ByteArrayToHexConverter.ByteArrayToHexViaLookupPerByte(bytes)}"); }