From 07ed63d525f5725ecae714066d96f0096f8242e3 Mon Sep 17 00:00:00 2001 From: joel Date: Mon, 16 Sep 2024 18:17:13 +0300 Subject: [PATCH] fix: add cipher --- internal/crypto/password.go | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/internal/crypto/password.go b/internal/crypto/password.go index 0505651b30..a09811d1e8 100644 --- a/internal/crypto/password.go +++ b/internal/crypto/password.go @@ -2,6 +2,8 @@ package crypto import ( "context" + "crypto/aes" + "crypto/cipher" "crypto/subtle" "encoding/base64" "errors" @@ -321,19 +323,21 @@ func compareHashAndPasswordScrypt(ctx context.Context, hash, password string) er } func firebaseScrypt(password, salt, signerKey []byte, N, r, p uint64, keyLen int) ([]byte, error) { - // Step 1: Use standard scrypt to derive an intermediate key - intermediateKey, err := scrypt.Key(password, salt, int(N), int(r), int(p), 32) + + ck, err := scrypt.Key(password, salt, 1<