mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-22 18:08:18 +02: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
|
#!/snap/bin/powershell
|
||||||
#
|
#
|
||||||
|
# Syntax: SHA256.ps1 <file>
|
||||||
# Description: prints the SHA256 checksum of the given file
|
# Description: prints the SHA256 checksum of the given file
|
||||||
# Author: Markus Fleschutz
|
# Author: Markus Fleschutz
|
||||||
# Source: github.com/fleschutz/PowerShell
|
# Source: github.com/fleschutz/PowerShell
|
||||||
# License: CC0
|
# License: CC0
|
||||||
#
|
#
|
||||||
param(
|
param([string]$File)
|
||||||
[string]$File)
|
$Result = get-filehash $File -algorithm SHA256
|
||||||
|
|
||||||
$Result = get-filehash $File
|
|
||||||
write-host $Result.Hash
|
write-host $Result.Hash
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user