(ctx context.Context, plaintext []byte, label string)
| 90 | } |
| 91 | |
| 92 | func (ks *keyService) Encrypt(ctx context.Context, plaintext []byte, label string) ([]byte, error) { |
| 93 | key, err := ks.aes128Key(ctx, label) |
| 94 | if err != nil { |
| 95 | return nil, err |
| 96 | } |
| 97 | return Encrypt(key, plaintext) |
| 98 | } |
| 99 | |
| 100 | func (ks *keyService) ServerCertificate(ctx context.Context, label string) (tls.Certificate, error) { |
| 101 | return ks.vault.ServerCertificate(ctx, label) |