PowerShell: Secure Strings entschlüsseln

PowerShell: Secure Strings entschlüsseln

Patrick Gruenauer

3 месяца назад

93 Просмотров

$password = ConvertTo-SecureString 'P@ssw0rd' -AsPlainText -Force

$Ptr = [System.Runtime.InteropServices.Marshal]::SecureStringToCoTaskMemUnicode($password)
$result = [System.Runtime.InteropServices.Marshal]::PtrToStringUni($Ptr)
[System.Runtime.InteropServices.Marshal]::ZeroFreeCoTaskMemUnicode($Ptr)
$result

https://www.udemy.com/user/patrick-gruenauer/
Ссылки и html тэги не поддерживаются


Комментарии: