Example #1
0
        public override HashResult TransformFinal()
        {
            HashResult result = ComputeAggregatedBytes(Aggregate());

            Initialize();
            return(result);
        }
Example #2
0
        public HashResult ComputeFile(string a_file_name, long a_from = 0, long a_length = -1)
        {
            Initialize();
            TransformFile(a_file_name, a_from, a_length);
            HashResult result = TransformFinal();

            Initialize();
            return(result);
        }
Example #3
0
        public HashResult ComputeStream(Stream a_stream, long a_length = -1)
        {
            Initialize();
            TransformStream(a_stream, a_length);
            HashResult result = TransformFinal();

            Initialize();
            return(result);
        }
Example #4
0
        public virtual HashResult ComputeBytes(byte[] a_data)
        {
            Initialize();
            TransformBytes(a_data);
            HashResult result = TransformFinal();

            Initialize();
            return(result);
        }
Example #5
0
        public override HashResult TransformFinal()
        {
            HashResult h = m_hash.TransformFinal();

            m_hash.TransformBytes(m_opad);
            m_hash.TransformBytes(h.GetBytes());
            h = m_hash.TransformFinal();
            Initialize();
            return(h);
        }
Example #6
0
        public override bool Equals(Object a_obj)
        {
            HashResult hash_result = a_obj as HashResult;

            if ((HashResult)hash_result == null)
            {
                return(false);
            }

            return(Equals(hash_result));
        }
Example #7
0
 public bool Equals(HashResult a_hashResult)
 {
     return(HashResult.SameArrays(a_hashResult.GetBytes(), m_hash));
 }