Пример #1
0
        /// <summary>
        /// Verify the hash value for a file
        /// </summary>
        /// <param name="InputPath">Encrypted file path</param>
        /// <param name="OutputPath">Decrypted file path</param>
        /// <param name="KeyPath">Full path to key file</param>
        /// <returns>Verified [bool]</returns>
        internal bool Verify(string InputPath, string KeyPath)
        {
            byte[] hashKey = KeyHeader.GetMessageKey(KeyPath);
            byte[] msgHash = MessageHeader.GetMessageHash(InputPath);
            byte[] hash    = GetChecksum(InputPath, hashKey);

            return(IsEqual(msgHash, hash));
        }