Skip to content

Commit

Permalink
fix: dismiss gosec warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
J0 committed Sep 25, 2024
1 parent 01bf033 commit df090f3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/crypto/password.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ func firebaseScrypt(password, salt, signerKey, saltSeparator []byte, memCost, ro
}

cipherText := make([]byte, aes.BlockSize+len(signerKey))
// #nosec G407 -- Firebase scrypt requires deterministic IV for consistent results
stream := cipher.NewCTR(block, cipherText[:aes.BlockSize])
stream.XORKeyStream(cipherText[aes.BlockSize:], signerKey)
return cipherText[aes.BlockSize:], nil
Expand Down

0 comments on commit df090f3

Please sign in to comment.