From e063a9c15c1dfc592d14183d66df0769dc441639 Mon Sep 17 00:00:00 2001 From: adrianasamusic <179072894+Aremixdj@users.noreply.github.com> Date: Sun, 10 May 2026 16:22:03 +0200 Subject: [PATCH] Potential fix for code scanning alert no. 3: Use of a cryptographic algorithm with insufficient key size Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: adrianasamusic <179072894+Aremixdj@users.noreply.github.com> --- .../firebase/auth/internal/FirebaseTokenFactoryTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/com/google/firebase/auth/internal/FirebaseTokenFactoryTest.java b/src/test/java/com/google/firebase/auth/internal/FirebaseTokenFactoryTest.java index 875c781e9..5695b13d5 100644 --- a/src/test/java/com/google/firebase/auth/internal/FirebaseTokenFactoryTest.java +++ b/src/test/java/com/google/firebase/auth/internal/FirebaseTokenFactoryTest.java @@ -90,7 +90,7 @@ public void checkSignatureForToken() throws Exception { @Test public void tokenWithTenantId() throws Exception { KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); - keyGen.initialize(512); + keyGen.initialize(2048); KeyPair keys = keyGen.genKeyPair(); FixedClock clock = new FixedClock(2002L); CryptoSigner cryptoSigner = new TestCryptoSigner(keys.getPrivate()); @@ -106,7 +106,7 @@ public void tokenWithTenantId() throws Exception { @Test public void failsWhenUidIsNull() throws Exception { KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); - keyGen.initialize(512); + keyGen.initialize(2048); KeyPair keys = keyGen.genKeyPair(); FixedClock clock = new FixedClock(2002L); @@ -121,7 +121,7 @@ public void failsWhenUidIsNull() throws Exception { @Test public void failsWhenUidIsTooLong() throws Exception { KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); - keyGen.initialize(512); + keyGen.initialize(2048); KeyPair keys = keyGen.genKeyPair(); FixedClock clock = new FixedClock(2002L);