fix26: полный прод-фикс auth/jwt, import-export peer и frontend flow
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
@@ -124,10 +123,3 @@ func DecryptAESGCM(cipherText string, key []byte) (string, error) {
|
||||
return string(plain), nil
|
||||
}
|
||||
|
||||
func PeerSecretDigest(rawSecret string) string {
|
||||
secretKey := strings.TrimSpace(os.Getenv("HY2XS_PEER_SECRET_KEY"))
|
||||
if secretKey == "" {
|
||||
secretKey = "hy2xs-peer-secret-key"
|
||||
}
|
||||
return HmacSHA256Hex(rawSecret, secretKey)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user