encryptPayload returns the payload for an encrypt request of the dataKey.
(dataKey []byte)
| 340 | |
| 341 | // encryptPayload returns the payload for an encrypt request of the dataKey. |
| 342 | func encryptPayload(dataKey []byte) map[string]interface{} { |
| 343 | encoded := base64.StdEncoding.EncodeToString(dataKey) |
| 344 | return map[string]interface{}{ |
| 345 | "plaintext": encoded, |
| 346 | } |
| 347 | } |
| 348 | |
| 349 | // encryptedKeyFromSecret attempts to extract the encrypted key from the data |
| 350 | // of the provided secret. |
no outgoing calls