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

            Initialize();
            return(result);
        }
Beispiel #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);
        }
Beispiel #3
0
        public virtual HashResult ComputeBytes(byte[] a_data)
        {
            Initialize();
            TransformBytes(a_data);
            HashResult result = TransformFinal();

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