4d8678c7f2
Co-authored-by: Michael Mandrus <michael.mandrus@grafana.com> Co-authored-by: Matheus Macabu <macabu@users.noreply.github.com>
19 lines
301 B
Go
19 lines
301 B
Go
package cipher
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type Cipher interface {
|
|
Encrypter
|
|
Decrypter
|
|
}
|
|
|
|
type Encrypter interface {
|
|
Encrypt(ctx context.Context, payload []byte, secret string) ([]byte, error)
|
|
}
|
|
|
|
type Decrypter interface {
|
|
Decrypt(ctx context.Context, payload []byte, secret string) ([]byte, error)
|
|
}
|