mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-06-30 04:31:39 +02:00
Rename to get-sha1.ps1 and get-sha256.ps1
This commit is contained in:
@ -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
|
@ -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
|
Reference in New Issue
Block a user