Partilhar via


get-SHA256

Get the SHA256 hash in one line of powershell:

function get-sha256 {
param($file);[system.bitconverter]::tostring([System.Security.Cryptography.sha256]::create().computehash([system.io.file]::openread((resolve-path $file)))) -replace "-",""
}

Comments

  • Anonymous
    March 14, 2007
    A slight modification of Mike's version , since sometimes I want md5, sometimes sha1, whatever, and I