1 Star 0 Fork 0

kartzan/netch1111

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
sha256.ps1 683 Bytes
Copy Edit Raw Blame History
Connection Refused authored 2021-10-16 15:39 . [Scripts] Update sha256.ps1
param (
[string]
$Location = ''
)
Push-Location $Location
$global:data = ''
function Scan {
param (
[string]
$path = ''
)
foreach ( $item in ( Get-ChildItem -Path $path -File ) ) {
$name = $item.Name
$global:data += (Get-FileHash -Path ".\$path\$name" -Algorithm SHA256).Hash.ToLower()
}
foreach ( $item in ( Get-ChildItem -Path $path -Directory ) ) {
$name = $item.Name
Scan -Path ".\$path\$name"
}
}
Scan -Path '.'
Write-Output (Get-FileHash -InputStream ([System.IO.MemoryStream]::New([System.Text.Encoding]::UTF8.GetBytes($data)))).Hash.ToLower()
Pop-Location
exit 0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/kartzan/netch1111.git
git@gitee.com:kartzan/netch1111.git
kartzan
netch1111
netch1111
main

Search