mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 10:20:29 -06:00
28e27e1365
* Encryption: De-duplicate encryption code with extensible service * Fix Wire injections * Fix tests * Register reload handler
25 lines
564 B
Go
25 lines
564 B
Go
package provider
|
|
|
|
import (
|
|
"github.com/grafana/grafana/pkg/services/encryption"
|
|
)
|
|
|
|
type Provider struct{}
|
|
|
|
func ProvideEncryptionProvider() Provider {
|
|
return Provider{}
|
|
}
|
|
|
|
func (p Provider) ProvideCiphers() map[string]encryption.Cipher {
|
|
return map[string]encryption.Cipher{
|
|
encryption.AesCfb: aesCfbCipher{},
|
|
}
|
|
}
|
|
|
|
func (p Provider) ProvideDeciphers() map[string]encryption.Decipher {
|
|
return map[string]encryption.Decipher{
|
|
encryption.AesCfb: aesDecipher{algorithm: encryption.AesCfb},
|
|
encryption.AesGcm: aesDecipher{algorithm: encryption.AesGcm},
|
|
}
|
|
}
|