[server] use encryption_key for couchbase env as hash is reserved keyword

This commit is contained in:
Lakhan Samani
2023-01-31 11:18:20 +05:30
parent 748761926d
commit a1df2ce31f
9 changed files with 29 additions and 20 deletions

View File

@@ -4,6 +4,7 @@ import (
"crypto/aes"
"crypto/cipher"
"crypto/rand"
"fmt"
"io"
"github.com/authorizerdev/authorizer/server/constants"
@@ -56,6 +57,7 @@ func DecryptAES(text string) (string, error) {
func EncryptAESEnv(text []byte) ([]byte, error) {
var res []byte
k, err := memorystore.Provider.GetStringStoreEnvVariable(constants.EnvKeyEncryptionKey)
fmt.Println("=> key:", k)
if err != nil {
return res, err
}