copy crypto to utils
This commit is contained in:
parent
35aa88b939
commit
074bf565c0
2 changed files with 75 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue