Exemple #1
0
        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();
        }
Exemple #2
0
 public static byte[] FromString(string hex, bool prefixed = false)
 {
     return(HexBouncyCastle.Decode(prefixed ? hex.Substring(2) : hex));
 }
Exemple #3
0
 public static string ToHexString(this byte[] bytes)
 {
     return(HexBouncyCastle.ToHexString(bytes));
 }
Exemple #4
0
 public static string ToHexString(this byte[] bytes, int offset, int count)
 {
     return(HexBouncyCastle.ToHexString(bytes, offset, count));
 }
Exemple #5
0
 public static byte[] FromString(string hex)
 {
     return(HexBouncyCastle.Decode(hex));
 }