Encrypting Passwords in PowerShell With Your Own Key

Prof Bill Buchanan OBE FRSE
2 min readJan 5, 2024

The security of passwords and strings is a little confusing in Microsoft Windows —and much of it uses legacy methods. For strings we can encrypt them into secure strings using the Data Protection Application Programming Interface (DPAPI). But, what if we want to use our own keys?

In terms of the encryption methods, it has been discovered that the DPAPI method depend on the…

--

--

Prof Bill Buchanan OBE FRSE

Professor of Cryptography. Serial innovator. Believer in fairness, justice & freedom. Based in Edinburgh. Old World Breaker. New World Creator. Building trust.