Encryption: Fix securedata
This commit is contained in:
@@ -1,16 +1,15 @@
|
|||||||
package securedata
|
package securedata
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/grafana/grafana/pkg/setting"
|
|
||||||
"github.com/grafana/grafana/pkg/util"
|
"github.com/grafana/grafana/pkg/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SecureData []byte
|
type SecureData []byte
|
||||||
|
|
||||||
func Encrypt(data []byte) (SecureData, error) {
|
func Encrypt(data []byte) (SecureData, error) {
|
||||||
return util.Encrypt(data, setting.SecretKey)
|
return util.Encrypt(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s SecureData) Decrypt() ([]byte, error) {
|
func (s SecureData) Decrypt() ([]byte, error) {
|
||||||
return util.Decrypt(s, setting.SecretKey)
|
return util.Decrypt(s)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user