| 1 | package kms |
| 2 | |
| 3 | import "github.com/denverdino/aliyungo/common" |
| 4 | |
| 5 | //https://help.aliyun.com/document_detail/28950.html?spm=5176.doc28947.6.564.JrFZRr |
| 6 | type DecryptArgs struct { |
| 7 | CiphertextBlob string |
| 8 | EncryptionContext map[string]string |
| 9 | } |
| 10 | |
| 11 | type DecryptResponse struct { |
| 12 | common.Response |
| 13 | Plaintext string |
| 14 | KeyId string |
| 15 | } |
| 16 | |
| 17 | func (client *Client) Decrypt(args *DecryptArgs) (*DecryptResponse, error) { |
| 18 | response := &DecryptResponse{} |
| 19 | err := client.Invoke("Decrypt", args, response) |
| 20 | return response, err |
| 21 | } |