mirror of
https://github.com/grafana/grafana.git
synced 2025-02-15 10:03:33 -06:00
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},
|
||
|
}
|
||
|
}
|