Creates a securestring from a normal string created by export-securestring
Snap-In: Microsoft.PowerShell.Security
Syntax:
ConvertTo-SecureString
[-String] <String> [ [-SecureKey] <SecureString>] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>]
ConvertTo-SecureString
[-String] <String> [-Key <Byte[]>] [-Verbose] [-Debug] [-ErrorAction <ActionPreference>] [-ErrorVariable <String>] [-OutVariable <String>] [-OutBuffer <Int32>]
Description:
ConvertTo-SecureString takes a normal string and converts it to a securestring using the DPAPIs. If a key is provided, the decryption will not use the DPAPI encryption, but another FIPS-140-compliant algorithm. The encryption key should be 16, 24, or 32 bytes long. The Rijndael algorithm used supports keys with lengths of 128, 192, and 256 bits.