Ejemplo n.º 1
0
        public override HashResult TransformFinal()
        {
            HashResult result = ComputeAggregatedBytes(Aggregate());

            Initialize();
            return(result);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
        public HashResult ComputeStream(Stream a_stream, long a_length = -1)
        {
            Initialize();
            TransformStream(a_stream, a_length);
            HashResult result = TransformFinal();

            Initialize();
            return(result);
        }
Ejemplo n.º 4
0
        public virtual HashResult ComputeBytes(byte[] a_data)
        {
            Initialize();
            TransformBytes(a_data);
            HashResult result = TransformFinal();

            Initialize();
            return(result);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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));
        }
Ejemplo n.º 7
0
 public bool Equals(HashResult a_hashResult)
 {
     return(HashResult.SameArrays(a_hashResult.GetBytes(), m_hash));
 }