Is there a way in Windows to trick or simulate the file, made from other command output?
What I am looking for is the following bash equivalent, but for Windows and pageant:
sops --decrypt "${f}" | ssh-add -
While Windows CLI has just this:
pageant.exe file1.ppk .... fileN.ppk
So, I do not have to output decrypted content to the file to securely sdelete after
Actually, if there is a better cli-fed alternative. CMD or Powershell based. Keypass with agent plugin does not fit my workflow
For strings/keys:
For larger files you have a couple of options:
Windows Server:
.NET: Uses your CSP which may not be desirable
I can list many more options if need be but I don't know what you are trying to do. Better to use higher-level solutions but https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography can do what you want for sure.
Also clearly ssh-agent needs to be running for ssh-add. Can use the ssh-agent (which is now built-in on Windows Server but also comes with Git) or OpenSSH's ssh-agent but neither service is started by default.