Summary
Calculates the hash for a given file using the default (SHA256) algorithm.
- Namespace
- Cake
.Common .Security - Containing Type
- SecurityAliases
Syntax
[CakeMethodAlias]
public static FileHash CalculateFileHash(this ICakeContext context, FilePath filePath)
Examples
Information(
"Cake executable file SHA256 hash: {0}",
CalculateFileHash("Cake.exe").ToHex());
Attributes
Type | Description |
---|---|
Cake |
An attribute used to mark script method aliases. |
Parameters
Name | Type | Description |
---|---|---|
context | ICakeContext | The context. |
filePath | FilePath | The file path. |