# Decrypting Secure Strings

<figure><img src="https://3007503158-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fp6nDpW0GBTPP8pZM4JHQ%2Fuploads%2FkaZTiiUjSrmTHP90gz5x%2Fimage.png?alt=media&#x26;token=b8fb5bef-0628-4091-9a0e-8e1ec69b5681" alt=""><figcaption></figcaption></figure>

```
echo "01000000d08c9ddf0115d1118c7a00c04fc2..." > cred.txt
$pw = Get-Content cred.txt | ConvertTo-SecureString
$bstr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pw)
$UnsecurePassword = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto($bstr)
$UnsecurePassword
```

{% hint style="info" %}
Should convert the secure string to plaintext
{% endhint %}
