【问题标题】:GNUPG non interactive over WINDOWSGNUPG 在 WINDOWS 上非交互
【发布时间】:2013-07-29 08:03:02
【问题描述】:

我正在尝试使用 gnupg 从命令行使用对称密码加密文件,以将其包含在 powershell 脚本中。 我需要一个非交互式 gnupg cmd 命令行,我一直在尝试:

gpg --passphrase supersecret -c  c:\File\aa.jpg

echo supersecret| gpg -c --passphrase-fd=0 c:\File\aa.jpg

但两种方式都出现在 Windows 窗体窗口中。

这种方式不会出现 Windows 窗体,但我无法解密:

gpg.exe --batch --passphrase-fd 0 -c  c:\File\aa.jpg < supersecret

解密错误:

gpg.exe --decrypt c:\File\aa.jpg
gpg: datos cifrados CAST5
gpg: cifrado con 1 frase contrase±a
gpg: DBG: borrada frase de paso en cachÚ con ID: S5DE110F2F3E16E83
gpg: descifrado fallido: Bad session key

有什么想法吗?

【问题讨论】:

  • 是我的错,行 gpg.exe --batch --passphrase-fd 0 -c c:\File\aa.jpg
  • 最好将其发布为您自己问题的答案;以后遇到类似问题的其他人可能会更容易识别解决方案。

标签: windows powershell gnupg


【解决方案1】:

是我的错,行 gpg.exe --batch --passphrase-fd 0 -c c:\File\aa.jpg

【讨论】:

    猜你喜欢
    • 2017-07-15
    • 2010-11-30
    • 2023-03-17
    • 2021-09-23
    • 2020-08-17
    • 2010-11-26
    • 1970-01-01
    • 1970-01-01
    • 2013-05-23
    相关资源
    最近更新 更多