1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-26 21:07:58 +01:00

Add @SuppressWarnings("deprecation") to LengthTest

This commit is contained in:
Florian Schmaus 2018-08-05 12:22:49 +02:00
parent e9958bc620
commit d869bc8c8b

View file

@ -59,7 +59,9 @@ public class LengthTest extends AbstractPGPainlessTest {
throws PGPException, NoSuchAlgorithmException, NoSuchProviderException, InvalidAlgorithmParameterException,
IOException {
LOGGER.log(Level.INFO, "\nRSA-2048 -> RSA-2048");
@SuppressWarnings("deprecation")
PGPKeyRing sender = PGPainless.generateKeyRing().simpleRsaKeyRing("simplejid@server.tld", RsaLength._2048);
@SuppressWarnings("deprecation")
PGPKeyRing recipient = PGPainless.generateKeyRing().simpleRsaKeyRing("otherjid@other.srv", RsaLength._2048);
encryptDecryptForSecretKeyRings(sender, recipient);
}
@ -78,6 +80,7 @@ public class LengthTest extends AbstractPGPainlessTest {
public void rsaEc() throws PGPException, IOException, InvalidAlgorithmParameterException, NoSuchAlgorithmException,
NoSuchProviderException {
LOGGER.log(Level.INFO, "\nRSA-2048 -> EC");
@SuppressWarnings("deprecation")
PGPKeyRing sender = PGPainless.generateKeyRing().simpleRsaKeyRing("simplejid@server.tld", RsaLength._2048);
PGPKeyRing recipient = PGPainless.generateKeyRing().simpleEcKeyRing("otherjid@other.srv");
encryptDecryptForSecretKeyRings(sender, recipient);
@ -89,6 +92,7 @@ public class LengthTest extends AbstractPGPainlessTest {
IOException {
LOGGER.log(Level.INFO, "\nEC -> RSA-2048");
PGPKeyRing sender = PGPainless.generateKeyRing().simpleEcKeyRing("simplejid@server.tld");
@SuppressWarnings("deprecation")
PGPKeyRing recipient = PGPainless.generateKeyRing().simpleRsaKeyRing("otherjid@other.srv", RsaLength._2048);
encryptDecryptForSecretKeyRings(sender, recipient);
}