Table of Contents

Class FtpHash

Namespace
FluentFTP
Assembly
FluentFTP.dll

Represents a computed hash of an object on the FTP server. See the following link for more information: http://tools.ietf.org/html/draft-bryan-ftpext-hash-02

public class FtpHash
Inheritance
FtpHash
Inherited Members
Extension Methods

Properties

Algorithm

Gets the algorithm that was used to compute the hash

public FtpHashAlgorithm Algorithm { get; }

Property Value

FtpHashAlgorithm

IsValid

Gets a value indicating if this object represents a valid hash response from the server.

public bool IsValid { get; }

Property Value

bool

Value

Gets the computed hash returned by the server

public string Value { get; }

Property Value

string

Methods

Verify(Stream)

Computes the hash for the specified stream and compares it to the value in this object. CRC hashes are not supported because there is no built-in support in the .net framework and a CRC implementation exceeds the scope of this project. If you attempt to call this on a CRC hash a NotImplementedException will be thrown.

public bool Verify(Stream istream)

Parameters

istream Stream

The stream to compute the hash for

Returns

bool

True if the computed hash matches what's stored in this object.

Exceptions

NotImplementedException

Thrown if called on a CRC Hash

Verify(string)

Computes the hash for the specified file and compares it to the value in this object. CRC hashes are not supported because there is no built-in support in the .net framework and a CRC implementation exceeds the scope of this project. If you attempt to call this on a CRC hash a NotImplementedException will be thrown.

public bool Verify(string file)

Parameters

file string

The file to compute the hash for

Returns

bool

True if the computed hash matches what's stored in this object.

Exceptions

NotImplementedException

Thrown if called on a CRC Hash