copy crypto to utils

This commit is contained in:
Livio Amstutz 2019-12-17 15:21:31 +01:00
parent 35aa88b939
commit 074bf565c0
2 changed files with 75 additions and 3 deletions

View file

@ -1,6 +1,8 @@
package op
import "github.com/caos/utils/crypto"
import (
"github.com/caos/oidc/pkg/utils"
)
type Crypto interface {
Encrypt(string) (string, error)
@ -16,9 +18,9 @@ func NewAESCrypto(key [32]byte) Crypto {
}
func (c *aesCrypto) Encrypt(s string) (string, error) {
return crypto.EncryptAES(s, c.key)
return utils.EncryptAES(s, c.key)
}
func (c *aesCrypto) Decrypt(s string) (string, error) {
return crypto.DecryptAES(s, c.key)
return utils.DecryptAES(s, c.key)
}