(ctx context.Context, ciphertext []byte, label string)
| 114 | } |
| 115 | |
| 116 | func (ks *keyService) Unwrap(ctx context.Context, ciphertext []byte, label string) ([]byte, error) { |
| 117 | key, err := ks.vault.Key(ctx, label) |
| 118 | if err != nil { |
| 119 | return nil, err |
| 120 | } |
| 121 | return UnwrapKey(ciphertext, key) |
| 122 | } |
| 123 | |
| 124 | func (ks *keyService) Wrap(ctx context.Context, plaintext []byte, label string) ([]byte, error) { |
| 125 | key, err := ks.vault.Key(ctx, label) |