Files
tldr/pages.zh/common/gcloud-kms-decrypt.md

13 lines
707 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# gcloud kms 解密
> 使用 Cloud KMS 密钥解密密文文件。
> 另请参阅:`gcloud`。
> 更多信息:<https://cloud.google.com/sdk/gcloud/reference/kms/decrypt>。
- 使用指定的密钥、密钥环和位置解密文件:
`gcloud kms decrypt --key={{key_name}} --keyring={{keyring_name}} --location={{global}} --ciphertext-file={{path/to/ciphertext}} --plaintext-file={{path/to/plaintext}}`
- 使用附加认证数据 (AAD) 解密文件,并将解密后的明文写入 `stdout`
`gcloud kms decrypt --key={{key_name}} --keyring={{keyring_name}} --location={{global}} --additional-authenticated-data-file={{path/to/file.aad}} --ciphertext-file={{path/to/ciphertext}} --plaintext-file=-`