public static string ToHexString(this byte[] bytes) { return(HexBouncyCastle.ToHexString(bytes)); //var sb = new StringBuilder(); //foreach (var b in bytes) // sb.Append(b.ToString("x2")); //return sb.ToString(); }
public static byte[] FromString(string hex, bool prefixed = false) { return(HexBouncyCastle.Decode(prefixed ? hex.Substring(2) : hex)); }
public static string ToHexString(this byte[] bytes) { return(HexBouncyCastle.ToHexString(bytes)); }
public static string ToHexString(this byte[] bytes, int offset, int count) { return(HexBouncyCastle.ToHexString(bytes, offset, count)); }
public static byte[] FromString(string hex) { return(HexBouncyCastle.Decode(hex)); }