FileHash Class

Summary

Represents a calculated file hash.
Namespace
Cake.Common.Security
Base Types
  • object
graph BT Type-->Base0["object"] Type["FileHash"] class Type type-node

Syntax

public sealed class FileHash

Constructors

Name Summary
FileHash(FilePath, byte[], HashAlgorithm) Initializes a new instance of the FileHash class.

Properties

Name Value Summary
Algorithm HashAlgorithm
Gets the algorithm used for the hash computation.
ComputedHash byte[]
Gets the raw computed hash.
Path FilePath
Gets the FilePath for the file.

Methods

Name Value Summary
ToHex() string
Convert the file hash to a hexadecimal string.

Extension Methods

Name Value Summary
Dump<FileHash>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
IsIn<FileHash>(FileHash[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<FileHash>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<FileHash>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<FileHash>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<FileHash>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin