Description Usage Arguments Details Value Examples
Decrypt passwords encrypted with the Microsoft Data Protection API
1 |
file |
File that holds a password encrypted using DPAPI |
Requires Powershell to be installed and execution policy set to RemoteSigned.
This can be achieved by running
Set-ExecutionPolicy RemoteSigned
from Powershell.
An decrypted password as an invisible string. Invisible means that the password won't be displayed in the console, but can be assigned to a variable or used inline.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
# First run the command below from Powershell:
# Read-Host "PW?" -AsSecureString | ConvertFrom-SecureString | Out-File "C:\Temp\Password.txt"
# Now execute the following R commands to decrypt the password and save it in
# variable "x". Note that if run without assignment, the password will not
# be displayed in the console. Passwords must be saved to a variable or used
# inline within a connection string.
library("keyringr")
x <- decrypt_dpapi_pw("C:\\Temp\\Password.txt")
# function is best used in a connection string command:
ch <- odbcConnect("some dsn", uid = "user1", pwd = decrypt_dpapi_pw("C:\\Temp\\Password.txt"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.