Java heap space
java.lang.OutOfMemoryError: Java heap space
at org.bouncycastle.crypto.generators.Argon2BytesGenerator$Block.<init>(Argon2BytesGenerator.java:630)
at org.bouncycastle.crypto.generators.Argon2BytesGenerator$Block.<init>(Argon2BytesGenerator.java:621)
at org.bouncycastle.crypto.generators.Argon2BytesGenerator.initMemory(Argon2BytesGenerator.java:153)
at org.bouncycastle.crypto.generators.Argon2BytesGenerator.doInit(Argon2BytesGenerator.java:144)
at org.bouncycastle.crypto.generators.Argon2BytesGenerator.init(Argon2BytesGenerator.java:74)
at org.bouncycastle.openpgp.operator.PGPUtil.makeKeyFromPassPhrase(PGPUtil.java:75)
at org.bouncycastle.openpgp.operator.PGPUtil.makeKeyFromPassPhrase(PGPUtil.java:211)
at org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor.makeKeyFromPassPhrase(PBESecretKeyDecryptor.java:26)
at org.bouncycastle.openpgp.PGPSecretKey.extractKeyData(PGPSecretKey.java:550)
at org.bouncycastle.openpgp.PGPSecretKey.extractPrivateKey(PGPSecretKey.java:688)
at org.bouncycastle.openpgp.test.AEADProtectedPGPSecretKeyTest.unlockTestVector(AEADProtectedPGPSecretKeyTest.java:109)
at org.bouncycastle.openpgp.test.AEADProtectedPGPSecretKeyTest.performTest(AEADProtectedPGPSecretKeyTest.java:61)
at org.bouncycastle.util.test.SimpleTest.perform(SimpleTest.java:190)
at org.bouncycastle.openpgp.test.AEADWithArgon2Test.testAEADProtectedPGPSecretKey(AEADWithArgon2Test.java:21)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
at junit.extensions.TestSetup.run(TestSetup.java:27)
Java heap space
java.lang.OutOfMemoryError: Java heap space
at org.bouncycastle.crypto.generators.Argon2BytesGenerator$Block.<init>(Argon2BytesGenerator.java:630)
at org.bouncycastle.crypto.generators.Argon2BytesGenerator$Block.<init>(Argon2BytesGenerator.java:621)
at org.bouncycastle.crypto.generators.Argon2BytesGenerator.initMemory(Argon2BytesGenerator.java:153)
at org.bouncycastle.crypto.generators.Argon2BytesGenerator.doInit(Argon2BytesGenerator.java:144)
at org.bouncycastle.crypto.generators.Argon2BytesGenerator.init(Argon2BytesGenerator.java:74)
at org.bouncycastle.openpgp.operator.PGPUtil.makeKeyFromPassPhrase(PGPUtil.java:75)
at org.bouncycastle.openpgp.operator.PGPUtil.makeKeyFromPassPhrase(PGPUtil.java:211)
at org.bouncycastle.openpgp.operator.PBEDataDecryptorFactory.makeKeyFromPassPhrase(PBEDataDecryptorFactory.java:43)
at org.bouncycastle.openpgp.PGPPBEEncryptedData.getSessionKey(PGPPBEEncryptedData.java:165)
at org.bouncycastle.openpgp.PGPPBEEncryptedData.getDataStream(PGPPBEEncryptedData.java:202)
at org.bouncycastle.openpgp.test.Argon2S2KTest.decryptSymmetricallyEncryptedMessage(Argon2S2KTest.java:176)
at org.bouncycastle.openpgp.test.Argon2S2KTest.testDecryptAES128Message(Argon2S2KTest.java:137)
at org.bouncycastle.openpgp.test.Argon2S2KTest.performTest(Argon2S2KTest.java:99)
at org.bouncycastle.util.test.SimpleTest.perform(SimpleTest.java:190)
at org.bouncycastle.openpgp.test.Argon2Test.testArgon2(Argon2Test.java:21)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
at junit.extensions.TestSetup$1.protect(TestSetup.java:23)
In testAEADProtectedPGPSecretKey
and in testArgon2: