< prev index next >
src/java.base/share/classes/java/security/Signature.java
Print this page
@@ -35,11 +35,10 @@
import java.nio.ByteBuffer;
import java.security.Provider.Service;
import javax.crypto.Cipher;
-import javax.crypto.CipherSpi;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.BadPaddingException;
import javax.crypto.NoSuchPaddingException;
import sun.security.util.Debug;
@@ -178,19 +177,16 @@
// name of the equivalent cipher alg
private static final String RSA_CIPHER = "RSA/ECB/PKCS1Padding";
// all the services we need to lookup for compatibility with Cipher
- private static final List<ServiceId> rsaIds = Arrays.asList(
- new ServiceId[] {
+ private static final List<ServiceId> rsaIds = List.of(
new ServiceId("Signature", "NONEwithRSA"),
new ServiceId("Cipher", "RSA/ECB/PKCS1Padding"),
new ServiceId("Cipher", "RSA/ECB"),
new ServiceId("Cipher", "RSA//PKCS1Padding"),
- new ServiceId("Cipher", "RSA"),
- }
- );
+ new ServiceId("Cipher", "RSA"));
/**
* Returns a Signature object that implements the specified signature
* algorithm.
*
< prev index next >