Sha256: 6f1857a8419ccf84e098323e5ab2e7599738c8735be0f368861c2aab25146c78

Contents?: true

Size: 496 Bytes

Versions: 3

Compression:

Stored size: 496 Bytes

Contents

$p = $ExecutionContext.SessionState.Path
$path = $p.GetUnresolvedProviderPathFromPSPath("<%= path %>")

if (Test-Path $path -PathType Leaf) {
  $cryptoProv = [System.Security.Cryptography.<%= digest %>]::Create()
  $file = [System.IO.File]::Open($path,
      [System.IO.Filemode]::Open, [System.IO.FileAccess]::Read)
  $digest = ([System.BitConverter]::ToString($cryptoProv.ComputeHash($file)))
  $digest = $digest.Replace("-","").ToLower()
  $file.Close()

  Write-Output $digest
}

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
chef-winrm-fs-1.3.7 lib/chef-winrm-fs/scripts/checksum.ps1.erb
chef-winrm-fs-1.3.6 lib/winrm-fs/scripts/checksum.ps1.erb
winrm-fs-1.3.6 lib/winrm-fs/scripts/checksum.ps1.erb