mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-22 20:51:17 +01:00
Added MD5.ps1 and SHA1.ps1
This commit is contained in:
parent
91073e4cc4
commit
444abea634
12
Scripts/MD5.ps1
Normal file
12
Scripts/MD5.ps1
Normal file
@ -0,0 +1,12 @@
|
||||
#!/snap/bin/powershell
|
||||
#
|
||||
# Syntax: MD5.ps1 <file>
|
||||
# Description: prints the MD5 checksum of the given file
|
||||
# Author: Markus Fleschutz
|
||||
# Source: github.com/fleschutz/PowerShell
|
||||
# License: CC0
|
||||
#
|
||||
param([string]$File)
|
||||
$Result = get-filehash $File -algorithm MD5
|
||||
write-host $Result.Hash
|
||||
exit 0
|
12
Scripts/SHA1.ps1
Normal file
12
Scripts/SHA1.ps1
Normal file
@ -0,0 +1,12 @@
|
||||
#!/snap/bin/powershell
|
||||
#
|
||||
# Syntax: SHA1.ps1 <file>
|
||||
# Description: prints the SHA1 checksum of the given file
|
||||
# Author: Markus Fleschutz
|
||||
# Source: github.com/fleschutz/PowerShell
|
||||
# License: CC0
|
||||
#
|
||||
param([string]$File)
|
||||
$Result = get-filehash $File -algorithm SHA1
|
||||
write-host $Result.Hash
|
||||
exit 0
|
@ -1,13 +1,12 @@
|
||||
#!/snap/bin/powershell
|
||||
#
|
||||
# Syntax: SHA256.ps1 <file>
|
||||
# Description: prints the SHA256 checksum of the given file
|
||||
# Author: Markus Fleschutz
|
||||
# Source: github.com/fleschutz/PowerShell
|
||||
# License: CC0
|
||||
#
|
||||
param(
|
||||
[string]$File)
|
||||
|
||||
$Result = get-filehash $File
|
||||
param([string]$File)
|
||||
$Result = get-filehash $File -algorithm SHA256
|
||||
write-host $Result.Hash
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user