Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9124665
check_hash.ps1.erb
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
547 B
Subscribers
None
check_hash.ps1.erb
View Options
#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"))
}
if([System.IO.File]::Exists("
<%=
@passfile
%>
")){
$CurrentContent = Get-Content -Path "
<%=
@passfile
%>
"
if($CurrentContent -eq $StringBuilder.ToString()){
exit 0
}
}
exit 1
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jun 21, 7:23 PM (2 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3398597
Attached To
R205 puppet-puppetlabs-docker
Event Timeline
Log In to Comment