(ctx context.Context, ciphertext []byte, label string)
| 82 | } |
| 83 | |
| 84 | func (ks *keyService) Decrypt(ctx context.Context, ciphertext []byte, label string) ([]byte, error) { |
| 85 | key, err := ks.aes128Key(ctx, label) |
| 86 | if err != nil { |
| 87 | return nil, err |
| 88 | } |
| 89 | return Decrypt(key, ciphertext) |
| 90 | } |
| 91 | |
| 92 | func (ks *keyService) Encrypt(ctx context.Context, plaintext []byte, label string) ([]byte, error) { |
| 93 | key, err := ks.aes128Key(ctx, label) |