能够使用以下命令在没有 --ciphertext-file 文件路径的情况下进行加密
echo -n mytext | gcloud kms encrypt --plaintext-file=- \
--ciphertext-file=- --location=xxxx --keyring=xxx \
--key=xxxx | base64
Run Code Online (Sandbox Code Playgroud)
上面的命令返回一个响应CiQALDSTqyFnlrxtK9phQqLb849IZTiIOvjsG2.....
现在我想解密 CiQALDSTqyFnlrxtK9phQqLb849IZTiIOvjsG2.....。
以下是我尝试过但对我不起作用的
echo -n CiQALDSTqyFnlrxtK9phQqLb849IZTiIOvjsG2..... | \
gcloud kms decrypt --plaintext-file=- \
--ciphertext-file=- --location=xxx --keyring=xxx \
--key=xxx | base64
Run Code Online (Sandbox Code Playgroud)
收到错误ERROR: (gcloud.kms.decrypt) INVALID_ARGUMENT: Decryption failed: the ciphertext is invalid.
谢谢,任何帮助将不胜感激