mirror of
https://github.com/grafana/grafana.git
synced 2025-01-17 04:02:50 -06:00
ef22ff7315
* end 2 end * fix import * refactor * introduce securedata * check err * use testify instead of convey * cleanup test * cleanup test * blob time * rename funcs
17 lines
327 B
Go
17 lines
327 B
Go
package securedata
|
|
|
|
import (
|
|
"github.com/grafana/grafana/pkg/setting"
|
|
"github.com/grafana/grafana/pkg/util"
|
|
)
|
|
|
|
type SecureData []byte
|
|
|
|
func Encrypt(data []byte) (SecureData, error) {
|
|
return util.Encrypt(data, setting.SecretKey)
|
|
}
|
|
|
|
func (s SecureData) Decrypt() ([]byte, error) {
|
|
return util.Decrypt(s, setting.SecretKey)
|
|
}
|