Page MenuHomeSoftware Heritage

compute_hash.ps1.erb
No OneTemporary

compute_hash.ps1.erb

#file computes the 512SHA for a given string and writes it to a file
$String = $env:docker_auth
$HashName = "SHA512"
$StringBuilder = New-Object System.Text.StringBuilder
[System.Security.Cryptography.HashAlgorithm]::Create($HashName).ComputeHash([System.Text.Encoding]::UTF8.GetBytes($String))|%{
[Void]$StringBuilder.Append($_.ToString("x2"))
}
$StringBuilder.ToString() | Out-File <%= @passfile %>

File Metadata

Mime Type
text/plain
Expires
Sat, Jun 21, 9:18 PM (4 w, 16 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3404638

Event Timeline