< Back

ConvertTo-FIPSSecureString

Sun Jan 19, 2020 6:37 pm

NAME ConvertTo-FIPSSecureString



SYNOPSIS

Converts a string of encrypted text back into a SecureString object with a FIPS compliant algorithm using a

pre-shared key.

The Pre-Shared key can be provided as either a 32 byte array or a SecureString value.





SYNTAX

ConvertTo-FIPSSecureString [-EncryptedString] <String> -SecureKey <SecureString> [<CommonParameters>]



ConvertTo-FIPSSecureString [-EncryptedString] <String> -Key <Byte[]> [<CommonParameters>]





DESCRIPTION





PARAMETERS

-EncryptedString <String>

The string of encrypted text to convert back into a SecureString object



Required? true

Position? 2

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Key <Byte[]>

An array of 32 bytes that will be used as a the pre-shared key for decryption.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-SecureKey <SecureString>

A SecureString that will be converted into a 32 byte array used as the pre-shared key for decryption.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$EncryptedText = Get-Content ./encryptedText.txt



$MySecret = ConvertTo-FIPSSecureString -EncryptedString $EncryptedText -SecureKey ( ConvertTo-SecureString -String

'Pr3$haredK3y' -AsPlainText -Force )











RELATED LINKS