Re: SSH MAC Algorithm Names
I'm quite sure that it would take you less time to parse the current format, than to write this post and me to make the changes you ask for :)
SSH MAC algorithms:
hmac-sha2-256 (hmac-sha2-256-etm@openssh.com)
hmac-sha1 (hmac-sha1-etm@openssh.com)
hmac-sha1-96 (hmac-sha1-96-etm@openssh.com)
hmac-md5 (hmac-md5-etm@openssh.com)
# Create an object ($objAlgorithms) consisting of a property per algorithm type
# with a value that contains a comma separated list of the algorithm names.
$WinScpInfo = & 'C:\Program Files (x86)\WinSCP\WinSCP.com' /info
$objAlgorithms = [PSCustomObject]@{}
$WinScpInfo.ForEach({
# A heading is identified as a value ending in a colon.
If ($_[-1] -eq ':') {
$PropertyName = ($_.substring(0, ($_.length -1)))
}
# The end of a block of algorithms is identified as an empty line.
ElseIf ($_ -eq '') {
$objAlgorithms | Add-Member -Name $PropertyName -Type NoteProperty -Value $PropertyVal
$PropertyVal = ''
}
# Anything else is an algorithm name.
Else {
If ($PropertyVal) {
$PropertyVal = $PropertyVal, $_ -join ','
}
Else {
$PropertyVal = $_
}
}
})
hmac-sha2-256
hmac-sha1
hmac-sha1-96
hmac-md5
name etm_name
---- --------
hmac-sha2-256 hmac-sha2-256-etm@openssh.com
hmac-sha1 hmac-sha1-etm@openssh.com
hmac-sha1-96 hmac-sha1-96-etm@openssh.com
hmac-md5 hmac-md5-etm@openssh.com