예제 #1
0
 public HashHelper(EHashType type, Encoding codec, string cad)
 {
     if (codec != null && !string.IsNullOrEmpty(cad))
     {
         _Raw = HashRaw(type, codec.GetBytes(cad));
         _Hex = HexHelper.Buffer2Hex(_Raw);
     }
 }
예제 #2
0
        public static string HashHex(EHashType type, Encoding codec, string cad)
        {
            if (string.IsNullOrEmpty(cad))
            {
                return(null);
            }

            byte[] raw = HashRaw(type, codec.GetBytes(cad));
            return(HexHelper.Buffer2Hex(raw));
        }
예제 #3
0
 public static string HashHex(EHashType type, Stream bs, bool seekBegin)
 {
     return(HexHelper.Buffer2Hex(HashRaw(type, bs, seekBegin)));
 }
예제 #4
0
 public static string HashHex(EHashType type, byte[] bs, int index, int length)
 {
     return(HexHelper.Buffer2Hex(HashRaw(type, bs, index, length)));
 }
예제 #5
0
 public HashHelper(EHashType type, byte[] bx)
 {
     _Raw = HashRaw(type, bx, 0, bx.Length);
     _Hex = HexHelper.Buffer2Hex(_Raw);
 }
예제 #6
0
 public static string HashHex(EHashType type, byte[] bs)
 {
     return(HexHelper.Buffer2Hex(HashRaw(type, bs)));
 }