FtpClient.GetHashAlgorithm Method

System.Net.FtpClient

Collapse image Expand Image Copy image CopyHover image
Gets the currently selected hash algorith for the HASH command. This feature is experimental. See this link for details: http://tools.ietf.org/html/draft-bryan-ftpext-hash-02

Namespace: System.Net.FtpClient
Assembly: System.Net.FtpClient (in System.Net.FtpClient.dll) Version: 1.0.5064.17461

Syntax

C#
public FtpHashAlgorithm GetHashAlgorithm()
Visual Basic
Public Function GetHashAlgorithm As FtpHashAlgorithm
Visual C++
public:
virtual FtpHashAlgorithm GetHashAlgorithm() sealed

Return Value

Type: FtpHashAlgorithm
The FtpHashType flag or FtpHashType.NONE if there was a problem.

Implements

IFtpClient..::..GetHashAlgorithm()()()()

Examples

C#  Copy imageCopy
using System;
using System.Net;
using System.Net.FtpClient;

namespace Examples {
    public class GetHashAlgorithmExample {
        public static void GetHashAlgorithm() {
            using (FtpClient cl = new FtpClient()) {
                cl.Credentials = new NetworkCredential("user", "pass");
                cl.Host = "some.ftpserver.on.the.internet.com";

                Console.WriteLine("The server is using the following algorithm for computing hashes: {0}", 
                    cl.GetHashAlgorithm());   
            }
        }
    }
}

See Also