Functions/SSL/Get-TLSTranslationTable.ps1

Function Get-TLSTranslationTable
    {
    [cmdletbinding()]
    Param
        (
        # Direction of Mapping
        [Parameter(Mandatory=$False)]
        [ValidateSet("IntToCaption","CaptionToInt")]
        [string]
        $Direction = "CaptionToInt"
        )
    Begin
        {
        $MasterTable = [ordered]@{
            '2'     = "Ssl2"
            '768'   = "Ssl3"
            '769'   = "Tls1"
            '770'   = "Tls11"
            '771'   = "Tls12"
            '772'   = "Tls13"
            '256'   = "DTls1_PRE098f"
            '32528' = "Tls13_D16"
            '32530' = "Tls13_D18"
            '65279' = "DTls1"
            '65277' = "DTls11"
            }
        }
    Process
        {
        switch ($Direction)
            {
            "IntToCaption" {$MasterTable}
            "CaptionToInt" {$MasterTable | Switch-Hashtable}
            }
        }
    }