Skip to content

Commit 3eac36a

Browse files
committed
fixed typo, decreased visibility
1 parent d4901e6 commit 3eac36a

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

dsf-bpe/dsf-bpe-process-api-v2-impl/src/main/java/dev/dsf/bpe/v2/service/CryptoServiceImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public class CryptoServiceImpl implements CryptoService
5353
{
5454
public static final class KemDelegate implements Kem
5555
{
56-
public static final long ENCRYPT_LIMIT = 250 * 1024 * 1024; // 250 MiB
57-
public static final long DENCRYPT_LIMIT = (250 * 1024 * 1024) + 1024; // 250 MiB + 1024 Bytes
56+
protected static final long ENCRYPT_LIMIT = 250 * 1024 * 1024; // 250 MiB
57+
protected static final long DECRYPT_LIMIT = (250 * 1024 * 1024) + 1024; // 250 MiB + 1024 Bytes
5858

5959
private final AbstractKemAesGcm delegate;
6060

@@ -75,7 +75,7 @@ public InputStream decrypt(InputStream encrypted, PrivateKey privateKey)
7575
throws IOException, NoSuchAlgorithmException, InvalidKeyException, DecapsulateException,
7676
NoSuchPaddingException, InvalidAlgorithmParameterException
7777
{
78-
return delegate.decrypt(new LimitedInputStream(encrypted, DENCRYPT_LIMIT), privateKey);
78+
return delegate.decrypt(new LimitedInputStream(encrypted, DECRYPT_LIMIT), privateKey);
7979
}
8080
}
8181

dsf-bpe/dsf-bpe-process-api-v2-impl/src/test/java/dev/dsf/bpe/v2/service/CryptoServiceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void testDecryptLimit() throws Exception
8585
{
8686
try
8787
{
88-
InputStream encrypted = noLimitKem.encrypt(new NullInputStream(KemDelegate.DENCRYPT_LIMIT + 1),
88+
InputStream encrypted = noLimitKem.encrypt(new NullInputStream(KemDelegate.DECRYPT_LIMIT + 1),
8989
keyPair.getPublic());
9090

9191
kem.decrypt(encrypted, keyPair.getPrivate()).transferTo(new NullOutputStream());
@@ -94,7 +94,7 @@ public void testDecryptLimit() throws Exception
9494
}
9595
catch (IOException e)
9696
{
97-
assertEquals("Stream limit of " + KemDelegate.DENCRYPT_LIMIT + " bytes exceeded", e.getMessage());
97+
assertEquals("Stream limit of " + KemDelegate.DECRYPT_LIMIT + " bytes exceeded", e.getMessage());
9898
}
9999
}
100100
}

0 commit comments

Comments
 (0)