Encrypt Passwords

To store passwords in a secure way (without secure store) the solution supports password encryption.

1. Export Key

While installation the solution automatically creates a public-private key pair. To encrypt a password we need to export the public key. To export the key run the “Export-Key.ps1” script that is included in the download package. The script have to be executed on a SharePoint server.

PS> & .\Export-Key.ps1 –path “C:\public.key”

2. Encrypt Password

To encrypt a password we need  the key file that we’ve exported in step 1. The script have not be run on SharePoint server, you only need the key.

PS> & .\Encrypt-Password.ps1 –password “P@ssw0rd” –keyPath “C:\public.key”

3. Copy the encrypted password

The encrypted password will look like this:


You can copy the encrypted password to any action (e.g. Execute SQL) that requires a password.

Last edited Feb 21, 2011 at 8:16 PM by cglessner, version 2


No comments yet.