FAES/FAES_File.cs
/// <summary>
/// Gets the selected hash of the current FAES File
/// </summary>
/// <param name="hashType">Type of hash</param>
/// <returns>Selected hash of FAES File</returns>
Gets the selected hash of the current FAES File
Gets the selected hash of the current FAES File
public string GetFileHash(Checksums.ChecksumType hashType)
        {
            if (IsFile())
            {
                switch (hashType)
                {
                    case Checksums.ChecksumType.SHA1:
                        return Checksums.ConvertHashToString(Checksums.GetSHA1(GetPath()));
                    case Checksums.ChecksumType.SHA256:
                        return Checksums.ConvertHashToString(Checksums.GetSHA256(GetPath()));
                    case Checksums.ChecksumType.SHA512:
                        return Checksums.ConvertHashToString(Checksums.GetSHA512(GetPath()));
                    default:
                        return null;
                }
            }
            return null;
        }
public string GetFileHash ( Checksums . ChecksumType hashType ) { if ( IsFile ( ) ) { switch ( hashType ) { case Checksums . ChecksumType . SHA1 : return Checksums . ConvertHashToString ( Checksums . GetSHA1 ( GetPath ( ) ) ) ; case Checksums . ChecksumType . SHA256 : return Checksums . ConvertHashToString ( Checksums . GetSHA256 ( GetPath ( ) ) ) ; case Checksums . ChecksumType . SHA512 : return Checksums . ConvertHashToString ( Checksums . GetSHA512 ( GetPath ( ) ) ) ; default : return null ; } } return null ; }
Gets the selected hash of the current FAES File
Gets the selected hash of the current FAES File
Selected hash of FAES File
Selected hash of FAES File
hashType
Checksums.ChecksumType
Type of hash
Type of hash