< Back
ConvertFrom-FIPSSecureString
Post
NAME ConvertFrom-FIPSSecureString
SYNOPSIS
Converts a SecureString object into encrypted text 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
ConvertFrom-FIPSSecureString [-SecureString] <SecureString> -SecureKey <SecureString> [<CommonParameters>]
ConvertFrom-FIPSSecureString [-SecureString] <SecureString> -Key <Byte[]> [<CommonParameters>]
DESCRIPTION
PARAMETERS
-SecureString <SecureString>
The SecureString object that will returned as an encrypted string.
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 encryption.
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 encryption.
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:\\>ConvertFrom-FIPSSecureString -SecureString $MySecretValue -SecureKey ( ConvertTo-SecureString -String
'Pr3$haredK3y' -AsPlainText -Force ) | Out-File ./encryptedText.txt
Encrypts a SecureString object and saves it to disk.
RELATED LINKS
SYNOPSIS
Converts a SecureString object into encrypted text 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
ConvertFrom-FIPSSecureString [-SecureString] <SecureString> -SecureKey <SecureString> [<CommonParameters>]
ConvertFrom-FIPSSecureString [-SecureString] <SecureString> -Key <Byte[]> [<CommonParameters>]
DESCRIPTION
PARAMETERS
-SecureString <SecureString>
The SecureString object that will returned as an encrypted string.
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 encryption.
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 encryption.
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:\\>ConvertFrom-FIPSSecureString -SecureString $MySecretValue -SecureKey ( ConvertTo-SecureString -String
'Pr3$haredK3y' -AsPlainText -Force ) | Out-File ./encryptedText.txt
Encrypts a SecureString object and saves it to disk.
RELATED LINKS