function Get-SmartCutSha256 {
  [CmdletBinding()]
  param([Parameter(Mandatory = $true)][string]$LiteralPath)

  $stream = [IO.File]::Open(
    $LiteralPath,
    [IO.FileMode]::Open,
    [IO.FileAccess]::Read,
    [IO.FileShare]::Read
  )
  try {
    $hasher = [Security.Cryptography.SHA256]::Create()
    try {
      return [BitConverter]::ToString($hasher.ComputeHash($stream)).Replace('-', '')
    } finally {
      $hasher.Dispose()
    }
  } finally {
    $stream.Dispose()
  }
}
