Java Code Examples for java.security.Provider.Service#getClassName()
The following examples show how to use
java.security.Provider.Service#getClassName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Signature.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
private static boolean isSpi(Service s) { if (s.getType().equals("Cipher")) { // must be a CipherSpi, which we can wrap with the CipherAdapter return true; } String className = s.getClassName(); Boolean result = signatureInfo.get(className); if (result == null) { try { Object instance = s.newInstance(null); // Signature extends SignatureSpi // so it is a "real" Spi if it is an // instance of SignatureSpi but not Signature boolean r = (instance instanceof SignatureSpi) && (instance instanceof Signature == false); if ((debug != null) && (r == false)) { debug.println("Not a SignatureSpi " + className); debug.println("Delayed provider selection may not be " + "available for algorithm " + s.getAlgorithm()); } result = Boolean.valueOf(r); signatureInfo.put(className, result); } catch (Exception e) { // something is wrong, assume not an SPI return false; } } return result.booleanValue(); }
Example 2
Source File: GetInstance.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Check is subClass is a subclass of superClass. If not, * throw a NoSuchAlgorithmException. */ public static void checkSuperClass(Service s, Class<?> subClass, Class<?> superClass) throws NoSuchAlgorithmException { if (superClass == null) { return; } if (superClass.isAssignableFrom(subClass) == false) { throw new NoSuchAlgorithmException ("class configured for " + s.getType() + ": " + s.getClassName() + " not a " + s.getType()); } }
Example 3
Source File: Signature.java From Java8CN with Apache License 2.0 | 5 votes |
private static boolean isSpi(Service s) { if (s.getType().equals("Cipher")) { // must be a CipherSpi, which we can wrap with the CipherAdapter return true; } String className = s.getClassName(); Boolean result = signatureInfo.get(className); if (result == null) { try { Object instance = s.newInstance(null); // Signature extends SignatureSpi // so it is a "real" Spi if it is an // instance of SignatureSpi but not Signature boolean r = (instance instanceof SignatureSpi) && (instance instanceof Signature == false); if ((debug != null) && (r == false)) { debug.println("Not a SignatureSpi " + className); debug.println("Delayed provider selection may not be " + "available for algorithm " + s.getAlgorithm()); } result = Boolean.valueOf(r); signatureInfo.put(className, result); } catch (Exception e) { // something is wrong, assume not an SPI return false; } } return result.booleanValue(); }
Example 4
Source File: GetInstance.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Check is subClass is a subclass of superClass. If not, * throw a NoSuchAlgorithmException. */ public static void checkSuperClass(Service s, Class<?> subClass, Class<?> superClass) throws NoSuchAlgorithmException { if (superClass == null) { return; } if (superClass.isAssignableFrom(subClass) == false) { throw new NoSuchAlgorithmException ("class configured for " + s.getType() + ": " + s.getClassName() + " not a " + s.getType()); } }
Example 5
Source File: GetInstance.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
/** * Check is subClass is a subclass of superClass. If not, * throw a NoSuchAlgorithmException. */ public static void checkSuperClass(Service s, Class<?> subClass, Class<?> superClass) throws NoSuchAlgorithmException { if (superClass == null) { return; } if (superClass.isAssignableFrom(subClass) == false) { throw new NoSuchAlgorithmException ("class configured for " + s.getType() + ": " + s.getClassName() + " not a " + s.getType()); } }
Example 6
Source File: GetInstance.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Check is subClass is a subclass of superClass. If not, * throw a NoSuchAlgorithmException. */ public static void checkSuperClass(Service s, Class<?> subClass, Class<?> superClass) throws NoSuchAlgorithmException { if (superClass == null) { return; } if (superClass.isAssignableFrom(subClass) == false) { throw new NoSuchAlgorithmException ("class configured for " + s.getType() + ": " + s.getClassName() + " not a " + s.getType()); } }
Example 7
Source File: Signature.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
private static boolean isSpi(Service s) { if (s.getType().equals("Cipher")) { // must be a CipherSpi, which we can wrap with the CipherAdapter return true; } String className = s.getClassName(); Boolean result = signatureInfo.get(className); if (result == null) { try { Object instance = s.newInstance(null); // Signature extends SignatureSpi // so it is a "real" Spi if it is an // instance of SignatureSpi but not Signature boolean r = (instance instanceof SignatureSpi) && (instance instanceof Signature == false); if ((debug != null) && (r == false)) { debug.println("Not a SignatureSpi " + className); debug.println("Delayed provider selection may not be " + "available for algorithm " + s.getAlgorithm()); } result = Boolean.valueOf(r); signatureInfo.put(className, result); } catch (Exception e) { // something is wrong, assume not an SPI return false; } } return result.booleanValue(); }
Example 8
Source File: GetInstance.java From Bytecoder with Apache License 2.0 | 5 votes |
/** * Check is subClass is a subclass of superClass. If not, * throw a NoSuchAlgorithmException. */ public static void checkSuperClass(Service s, Class<?> subClass, Class<?> superClass) throws NoSuchAlgorithmException { if (superClass == null) { return; } if (superClass.isAssignableFrom(subClass) == false) { throw new NoSuchAlgorithmException ("class configured for " + s.getType() + ": " + s.getClassName() + " not a " + s.getType()); } }
Example 9
Source File: Signature.java From Bytecoder with Apache License 2.0 | 5 votes |
private static boolean isSpi(Service s) { if (s.getType().equals("Cipher")) { // must be a CipherSpi, which we can wrap with the CipherAdapter return true; } String className = s.getClassName(); Boolean result = signatureInfo.get(className); if (result == null) { try { Object instance = s.newInstance(null); // Signature extends SignatureSpi // so it is a "real" Spi if it is an // instance of SignatureSpi but not Signature boolean r = (instance instanceof SignatureSpi) && (instance instanceof Signature == false); if ((debug != null) && (r == false)) { debug.println("Not a SignatureSpi " + className); debug.println("Delayed provider selection may not be " + "available for algorithm " + s.getAlgorithm()); } result = Boolean.valueOf(r); signatureInfo.put(className, result); } catch (Exception e) { // something is wrong, assume not an SPI return false; } } return result.booleanValue(); }
Example 10
Source File: GetInstance.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Check is subClass is a subclass of superClass. If not, * throw a NoSuchAlgorithmException. */ public static void checkSuperClass(Service s, Class<?> subClass, Class<?> superClass) throws NoSuchAlgorithmException { if (superClass == null) { return; } if (superClass.isAssignableFrom(subClass) == false) { throw new NoSuchAlgorithmException ("class configured for " + s.getType() + ": " + s.getClassName() + " not a " + s.getType()); } }
Example 11
Source File: Signature.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
private static boolean isSpi(Service s) { if (s.getType().equals("Cipher")) { // must be a CipherSpi, which we can wrap with the CipherAdapter return true; } String className = s.getClassName(); Boolean result = signatureInfo.get(className); if (result == null) { try { Object instance = s.newInstance(null); // Signature extends SignatureSpi // so it is a "real" Spi if it is an // instance of SignatureSpi but not Signature boolean r = (instance instanceof SignatureSpi) && (instance instanceof Signature == false); if ((debug != null) && (r == false)) { debug.println("Not a SignatureSpi " + className); debug.println("Delayed provider selection may not be " + "available for algorithm " + s.getAlgorithm()); } result = Boolean.valueOf(r); signatureInfo.put(className, result); } catch (Exception e) { // something is wrong, assume not an SPI return false; } } return result.booleanValue(); }
Example 12
Source File: GetInstance.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
/** * Check is subClass is a subclass of superClass. If not, * throw a NoSuchAlgorithmException. */ public static void checkSuperClass(Service s, Class<?> subClass, Class<?> superClass) throws NoSuchAlgorithmException { if (superClass == null) { return; } if (superClass.isAssignableFrom(subClass) == false) { throw new NoSuchAlgorithmException ("class configured for " + s.getType() + ": " + s.getClassName() + " not a " + s.getType()); } }
Example 13
Source File: Signature.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
private static boolean isSpi(Service s) { if (s.getType().equals("Cipher")) { // must be a CipherSpi, which we can wrap with the CipherAdapter return true; } String className = s.getClassName(); Boolean result = signatureInfo.get(className); if (result == null) { try { Object instance = s.newInstance(null); // Signature extends SignatureSpi // so it is a "real" Spi if it is an // instance of SignatureSpi but not Signature boolean r = (instance instanceof SignatureSpi) && (instance instanceof Signature == false); if ((debug != null) && (r == false)) { debug.println("Not a SignatureSpi " + className); debug.println("Delayed provider selection may not be " + "available for algorithm " + s.getAlgorithm()); } result = Boolean.valueOf(r); signatureInfo.put(className, result); } catch (Exception e) { // something is wrong, assume not an SPI return false; } } return result.booleanValue(); }
Example 14
Source File: Signature.java From JDKSourceCode1.8 with MIT License | 5 votes |
private static boolean isSpi(Service s) { if (s.getType().equals("Cipher")) { // must be a CipherSpi, which we can wrap with the CipherAdapter return true; } String className = s.getClassName(); Boolean result = signatureInfo.get(className); if (result == null) { try { Object instance = s.newInstance(null); // Signature extends SignatureSpi // so it is a "real" Spi if it is an // instance of SignatureSpi but not Signature boolean r = (instance instanceof SignatureSpi) && (instance instanceof Signature == false); if ((debug != null) && (r == false)) { debug.println("Not a SignatureSpi " + className); debug.println("Delayed provider selection may not be " + "available for algorithm " + s.getAlgorithm()); } result = Boolean.valueOf(r); signatureInfo.put(className, result); } catch (Exception e) { // something is wrong, assume not an SPI return false; } } return result.booleanValue(); }
Example 15
Source File: GetInstance.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
/** * Check is subClass is a subclass of superClass. If not, * throw a NoSuchAlgorithmException. */ public static void checkSuperClass(Service s, Class<?> subClass, Class<?> superClass) throws NoSuchAlgorithmException { if (superClass == null) { return; } if (superClass.isAssignableFrom(subClass) == false) { throw new NoSuchAlgorithmException ("class configured for " + s.getType() + ": " + s.getClassName() + " not a " + s.getType()); } }
Example 16
Source File: Signature.java From jdk8u60 with GNU General Public License v2.0 | 5 votes |
private static boolean isSpi(Service s) { if (s.getType().equals("Cipher")) { // must be a CipherSpi, which we can wrap with the CipherAdapter return true; } String className = s.getClassName(); Boolean result = signatureInfo.get(className); if (result == null) { try { Object instance = s.newInstance(null); // Signature extends SignatureSpi // so it is a "real" Spi if it is an // instance of SignatureSpi but not Signature boolean r = (instance instanceof SignatureSpi) && (instance instanceof Signature == false); if ((debug != null) && (r == false)) { debug.println("Not a SignatureSpi " + className); debug.println("Delayed provider selection may not be " + "available for algorithm " + s.getAlgorithm()); } result = Boolean.valueOf(r); signatureInfo.put(className, result); } catch (Exception e) { // something is wrong, assume not an SPI return false; } } return result.booleanValue(); }
Example 17
Source File: Signature.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
private static boolean isSpi(Service s) { if (s.getType().equals("Cipher")) { // must be a CipherSpi, which we can wrap with the CipherAdapter return true; } String className = s.getClassName(); Boolean result = signatureInfo.get(className); if (result == null) { try { Object instance = s.newInstance(null); // Signature extends SignatureSpi // so it is a "real" Spi if it is an // instance of SignatureSpi but not Signature boolean r = (instance instanceof SignatureSpi) && (instance instanceof Signature == false); if ((debug != null) && (r == false)) { debug.println("Not a SignatureSpi " + className); debug.println("Delayed provider selection may not be " + "available for algorithm " + s.getAlgorithm()); } result = Boolean.valueOf(r); signatureInfo.put(className, result); } catch (Exception e) { // something is wrong, assume not an SPI return false; } } return result.booleanValue(); }
Example 18
Source File: Signature.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private static boolean isSpi(Service s) { if (s.getType().equals("Cipher")) { // must be a CipherSpi, which we can wrap with the CipherAdapter return true; } String className = s.getClassName(); Boolean result = signatureInfo.get(className); if (result == null) { try { Object instance = s.newInstance(null); // Signature extends SignatureSpi // so it is a "real" Spi if it is an // instance of SignatureSpi but not Signature boolean r = (instance instanceof SignatureSpi) && (instance instanceof Signature == false); if ((debug != null) && (r == false)) { debug.println("Not a SignatureSpi " + className); debug.println("Delayed provider selection may not be " + "available for algorithm " + s.getAlgorithm()); } result = Boolean.valueOf(r); signatureInfo.put(className, result); } catch (Exception e) { // something is wrong, assume not an SPI return false; } } return result.booleanValue(); }
Example 19
Source File: GetInstance.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
/** * Check is subClass is a subclass of superClass. If not, * throw a NoSuchAlgorithmException. */ public static void checkSuperClass(Service s, Class<?> subClass, Class<?> superClass) throws NoSuchAlgorithmException { if (superClass == null) { return; } if (superClass.isAssignableFrom(subClass) == false) { throw new NoSuchAlgorithmException ("class configured for " + s.getType() + ": " + s.getClassName() + " not a " + s.getType()); } }
Example 20
Source File: Signature.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
private static boolean isSpi(Service s) { if (s.getType().equals("Cipher")) { // must be a CipherSpi, which we can wrap with the CipherAdapter return true; } String className = s.getClassName(); Boolean result = signatureInfo.get(className); if (result == null) { try { Object instance = s.newInstance(null); // Signature extends SignatureSpi // so it is a "real" Spi if it is an // instance of SignatureSpi but not Signature boolean r = (instance instanceof SignatureSpi) && (instance instanceof Signature == false); if ((debug != null) && (r == false)) { debug.println("Not a SignatureSpi " + className); debug.println("Delayed provider selection may not be " + "available for algorithm " + s.getAlgorithm()); } result = Boolean.valueOf(r); signatureInfo.put(className, result); } catch (Exception e) { // something is wrong, assume not an SPI return false; } } return result.booleanValue(); }