Rename to get-sha1.ps1 and get-sha256.ps1

This commit is contained in:
Markus Fleschutz
2021-09-07 22:04:38 +02:00
parent bd76412d58
commit db0e0d37e5
4 changed files with 17 additions and 17 deletions

View File

@ -1,22 +1,22 @@
<#
.SYNOPSIS
SHA1.ps1 [<file>]
get-sha1.ps1 [<file>]
.DESCRIPTION
Prints the SHA1 checksum of the given file.
Prints the SHA1 checksum of the given file
.EXAMPLE
PS> .\SHA1.ps1 C:\MyFile.txt
PS> .\get-sha1.ps1 C:\MyFile.txt
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
param([string]$File = "")
param([string]$file = "")
try {
if ($File -eq "" ) { $File = read-host "Enter the filename" }
if ($file -eq "" ) { $file = read-host "Enter the filename" }
$Result = get-filehash $File -algorithm SHA1
$Result = get-filehash $file -algorithm SHA1
"✔️ SHA1 hash is" $Result.Hash
exit 0

View File

@ -1,22 +1,22 @@
<#
.SYNOPSIS
SHA256.ps1 [<file>]
get-sha256.ps1 [<file>]
.DESCRIPTION
Prints the SHA256 checksum of the given file.
Prints the SHA256 checksum of the given file
.EXAMPLE
PS> .\SHA256.ps1 C:\MyFile.txt
PS> .\get-sha256.ps1 C:\MyFile.txt
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
param([string]$File = "")
param([string]$file = "")
try {
if ($File -eq "" ) { $File = read-host "Enter the filename" }
if ($file -eq "" ) { $file = read-host "Enter the filename" }
$Result = get-filehash $File -algorithm SHA256
$Result = get-filehash $file -algorithm SHA256
"✔️ SHA256 hash is:" $Result.Hash
exit 0