Guest User

Untitled

a guest
Sep 18th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. $certPassword = Read-Host "Certificate password"
  2. $fullCertBytes = <certificate>
  3. $fullCert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2
  4. $fullCert.Import($fullCertBytes, $certPassword, 0)
  5. $encrypted = [Convert]::FromBase64String((Read-Host "Encrypted password"))
  6. [System.Text.Encoding]::UTF8.GetString(($fullCert.PrivateKey.Decrypt($encrypted, $true)))
Add Comment
Please, Sign In to add comment