Exception in thread "main" java.lang.UnsatisfiedLinkError: dpapi.DPAPI.CryptProtectData(Ljava/lang/String;[BZ)[B at dpapi.DataProtector.protect(DataProtector.java:60)
at dp
DPAPI有两个功能:CryptUnprotectData和CryptProtectData。另外,我发现了An important point to remember is that DPAPI merely applies cryptographic protection to the dataIt does not store any of the protected data; therefore applications calling DPAPI must implement their
我想用DPAPI加密一个SecureString,这样我就可以把它保存到磁盘上。
.net DPAPI类是ProtectedData类,但是,有一个接受字节数组的重载。PowerShell cmdlet似乎做了我需要的事情,因为“如果没有指定密钥,Windows Data Protection API (DPAPI)将用于加密标准字符串表示”,但我不确定如何直接从.net