gpt4 book ai didi

amazon-web-services - 调用解密操作时发生客户端错误 (InvalidCiphertextException) :

转载 作者:行者123 更新时间:2023-12-03 17:37:36 27 4
gpt4 key购买 nike

当我尝试执行命令时:

aws kms decrypt --ciphertext-blob fileb://CPOEncrypted.txt --output text --query Plaintext

我收到以下错误,我怀疑是密文问题。
A client error (InvalidCiphertextException) occurred when calling the Decrypt operation:

最佳答案

1. 确保您的 aws 已在 pc 上配置,AWS 访问 key ID 和 AWS secret 访问 key 已设置。配置它 - 在控制台中运行:

$ aws configure

( http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html )。

2. 确保文件正确。我遇到了同样的问题,因为在复制粘贴过程中遗漏了 BASE64 的某些部分 - 所以 BASE64 代码不正确。
现在它工作正常。我使用此命令创建代码所在的文件
以 Base64 格式编码的 client_secret(当然在示例中随机更改了字母和代码数量):
$echo ZPATMQE/c3o06DQL0FnZn1Q04Ojh8JbKh87gNohFJFvJ8L456JGFFDhtscGHDjOhbnwKDJnUnK5lkjOJHFDkGuyhgouyfk2YFhgfgffftftDTDBtdbItydbtDbtd65Hf654521JHJHFJGSJFAlc3Qhgb4/s3daa435KHGJGjhgf+as54asd54DKUGdasd54asd5DFf+a54faas65454asUHgTm+a | base64 -di > encrypted-file

3. 然后我在控制台中使用这个命令得到最终结果:
$ echo $(aws kms decrypt --ciphertext-blob fileb://encrypted-file --query Plaintext --output text | base64 -di)

关于amazon-web-services - 调用解密操作时发生客户端错误 (InvalidCiphertextException) :,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45062953/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com