public void SetByteStringFormat(ByteStringFormat format)
 {
     foreach (KeyValuePair <string, ByteStringAuto> item in hashes)
     {
         item.Value.StringFormat = format;
     }
 }
Beispiel #2
0
        public bool ComputeHash(Stream inputStream, ByteStringFormat format)
        {
            bool res = (m_algorithm != null);

            if (res)
            {
                res = SetHashValue(m_algorithm.ComputeHash(inputStream), format);
            }
            return(res);
        }
Beispiel #3
0
        public bool ComputeHash(byte[] buffer, int offset, int count, ByteStringFormat format)
        {
            bool res = (m_algorithm != null);

            if (res)
            {
                res = SetHashValue(m_algorithm.ComputeHash(buffer, offset, count), format);
            }
            return(res);
        }
Beispiel #4
0
 private bool SetHashValue(byte[] bs, ByteStringFormat format)
 {
     if (m_HashValue != null)
     {
         m_HashValue.Bytes        = bs;
         m_HashValue.StringFormat = format;
     }
     else
     {
         m_HashValue = new ByteStringAuto(bs, format);
     }
     return(bs != null);
 }
Beispiel #5
0
 public HashHelper(byte[] src, ByteStringFormat format)
 {
     HashValue = new ByteStringAuto(src, format);
 }
Beispiel #6
0
 public ByteStringAuto(ByteStringFormat format)
 {
     StringFormat = format;
 }
Beispiel #7
0
 public ByteStringAuto(byte[] src, ByteStringFormat format)
     : base(src)
 {
     StringFormat = format;
 }