mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-01 14:56:30 +00:00
17 lines
473 B
Go
17 lines
473 B
Go
// Copyright 2021 The Gitea Authors. All rights reserved.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package secrets
|
|
|
|
// EncryptionProvider encrypts and decrypts secrets
|
|
type EncryptionProvider interface {
|
|
Encrypt(secret, key []byte) ([]byte, error)
|
|
|
|
EncryptString(secret string, key []byte) (string, error)
|
|
|
|
Decrypt(enc, key []byte) ([]byte, error)
|
|
|
|
DecryptString(enc string, key []byte) (string, error)
|
|
}
|