Closed
Description
Steps to reproduce
function Get-HashValueFromString {
[CmdletBinding()]
Param (
[parameter(Mandatory=$true)] [ValidateNotNullOrEmpty()] [String] $string
, [parameter(Mandatory=$false)]
[ValidateSet("SHA1", "SHA256", "SHA384", "SHA512", "MACTripleDES", "MD5", "RIPEMD160")]
[String] $algorithm = "SHA256"
)
END{
[byte[]]$testbytes = [System.Text.UnicodeEncoding]::Unicode.GetBytes($string)
[System.IO.Stream]$memorystream = [System.IO.MemoryStream]::new($testbytes)
$hashfromstream = Get-FileHash -InputStream $memorystream -Algorithm $algorithm
$hashfromstream.Hash.ToString()
}
}
New-MarkdownHelp -Command Get-HashValueFromString -OutputFolder C:\tmp
Expected behavior
EXAMPLES
Example 1
{{ Add example code here }}
{{ Add example description here }}
Actual behavior
EXAMPLES
Example 1
PS C:\> {{ Add example code here }}
{{ Add example description here }}
Environment data
v0.5.0