/** * Returns the default SecureRandom service description. */ public static synchronized Provider.Service getSecureRandomService() { getCacheVersion(); // used for side effect of updating cache if needed return cachedSecureRandomService; }
private static synchronized void checkCacheVersion() { int newCacheVersion = Services.getCacheVersion(); if (newCacheVersion != cacheVersion) { // // Now search providers for mappings like // Alg.Alias.<service>.<OID-INTS-DOT-SEPARATED>=<alg-name> // or // Alg.Alias.<service>.OID.<OID-INTS-DOT-SEPARATED>=<alg-name> // Provider[] pl = Security.getProviders(); for (Provider element : pl) { selectEntries(element); } cacheVersion = newCacheVersion; } }
/** * Finds the appropriate service implementation and returns an * {@code SpiAndProvider} instance containing a reference to SPI * and its {@code Provider} */ public SpiAndProvider getInstance(String algorithm, Object param) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NoSuchAlgorithmException("Null algorithm name"); } int newCacheVersion = Services.getCacheVersion(); Provider.Service service; ServiceCacheEntry cacheEntry = this.serviceCache; if (cacheEntry != null && cacheEntry.algorithm.equalsIgnoreCase(algorithm) && newCacheVersion == cacheEntry.cacheVersion) { service = cacheEntry.service; } else { if (Services.isEmpty()) { throw notFound(serviceName, algorithm); } String name = this.serviceName + "." + algorithm.toUpperCase(Locale.US); service = Services.getService(name); if (service == null) { throw notFound(serviceName, algorithm); } this.serviceCache = new ServiceCacheEntry(algorithm, newCacheVersion, service); } return new SpiAndProvider(service.newInstance(param), service.getProvider()); }
/** * Returns the default SecureRandom service description. */ public static synchronized Provider.Service getSecureRandomService() { getCacheVersion(); // used for side effect of updating cache if needed return cachedSecureRandomService; }
/** * Returns the default SecureRandom service description. */ public static synchronized Provider.Service getSecureRandomService() { getCacheVersion(); // used for side effect of updating cache if needed return cachedSecureRandomService; }
/** * Returns the default SecureRandom service description. */ public static synchronized Provider.Service getSecureRandomService() { getCacheVersion(); // used for side effect of updating cache if needed return cachedSecureRandomService; }
/** * Returns the default SecureRandom service description. */ public static synchronized Provider.Service getSecureRandomService() { getCacheVersion(); // used for side effect of updating cache if needed return cachedSecureRandomService; }
/** * Returns the default SecureRandom service description. */ public static synchronized Provider.Service getSecureRandomService() { getCacheVersion(); // used for side effect of updating cache if needed return cachedSecureRandomService; }
/** * Returns the default SecureRandom service description. */ public static synchronized Provider.Service getSecureRandomService() { getCacheVersion(); // used for side effect of updating cache if needed return cachedSecureRandomService; }
private static synchronized void checkCacheVersion() { int newCacheVersion = Services.getCacheVersion(); if (newCacheVersion != cacheVersion) { // // Now search providers for mappings like // Alg.Alias.<service>.<OID-INTS-DOT-SEPARATED>=<alg-name> // or // Alg.Alias.<service>.OID.<OID-INTS-DOT-SEPARATED>=<alg-name> // Provider[] pl = Security.getProviders(); for (Provider element : pl) { selectEntries(element); } cacheVersion = newCacheVersion; } }
private static synchronized void checkCacheVersion() { int newCacheVersion = Services.getCacheVersion(); if (newCacheVersion != cacheVersion) { // // Now search providers for mappings like // Alg.Alias.<service>.<OID-INTS-DOT-SEPARATED>=<alg-name> // or // Alg.Alias.<service>.OID.<OID-INTS-DOT-SEPARATED>=<alg-name> // Provider[] pl = Security.getProviders(); for (Provider element : pl) { selectEntries(element); } cacheVersion = newCacheVersion; } }
private static synchronized void checkCacheVersion() { int newCacheVersion = Services.getCacheVersion(); if (newCacheVersion != cacheVersion) { // // Now search providers for mappings like // Alg.Alias.<service>.<OID-INTS-DOT-SEPARATED>=<alg-name> // or // Alg.Alias.<service>.OID.<OID-INTS-DOT-SEPARATED>=<alg-name> // Provider[] pl = Security.getProviders(); for (Provider element : pl) { selectEntries(element); } cacheVersion = newCacheVersion; } }
private static synchronized void checkCacheVersion() { int newCacheVersion = Services.getCacheVersion(); if (newCacheVersion != cacheVersion) { // // Now search providers for mappings like // Alg.Alias.<service>.<OID-INTS-DOT-SEPARATED>=<alg-name> // or // Alg.Alias.<service>.OID.<OID-INTS-DOT-SEPARATED>=<alg-name> // Provider[] pl = Security.getProviders(); for (Provider element : pl) { selectEntries(element); } cacheVersion = newCacheVersion; } }
private static synchronized void checkCacheVersion() { int newCacheVersion = Services.getCacheVersion(); if (newCacheVersion != cacheVersion) { // // Now search providers for mappings like // Alg.Alias.<service>.<OID-INTS-DOT-SEPARATED>=<alg-name> // or // Alg.Alias.<service>.OID.<OID-INTS-DOT-SEPARATED>=<alg-name> // Provider[] pl = Security.getProviders(); for (Provider element : pl) { selectEntries(element); } cacheVersion = newCacheVersion; } }
private static synchronized void checkCacheVersion() { int newCacheVersion = Services.getCacheVersion(); if (newCacheVersion != cacheVersion) { // // Now search providers for mappings like // Alg.Alias.<service>.<OID-INTS-DOT-SEPARATED>=<alg-name> // or // Alg.Alias.<service>.OID.<OID-INTS-DOT-SEPARATED>=<alg-name> // Provider[] pl = Security.getProviders(); for (Provider element : pl) { selectEntries(element); } cacheVersion = newCacheVersion; } }
/** * Finds the appropriate service implementation and returns an * {@code SpiAndProvider} instance containing a reference to SPI * and its {@code Provider} */ public SpiAndProvider getInstance(String algorithm, Object param) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NoSuchAlgorithmException("Null algorithm name"); } int newCacheVersion = Services.getCacheVersion(); Provider.Service service; ServiceCacheEntry cacheEntry = this.serviceCache; if (cacheEntry != null && cacheEntry.algorithm.equalsIgnoreCase(algorithm) && newCacheVersion == cacheEntry.cacheVersion) { service = cacheEntry.service; } else { if (Services.isEmpty()) { throw notFound(serviceName, algorithm); } String name = this.serviceName + "." + algorithm.toUpperCase(Locale.US); service = Services.getService(name); if (service == null) { throw notFound(serviceName, algorithm); } this.serviceCache = new ServiceCacheEntry(algorithm, newCacheVersion, service); } return new SpiAndProvider(service.newInstance(param), service.getProvider()); }
/** * Finds the appropriate service implementation and returns an * {@code SpiAndProvider} instance containing a reference to SPI * and its {@code Provider} */ public SpiAndProvider getInstance(String algorithm, Object param) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NoSuchAlgorithmException("Null algorithm name"); } int newCacheVersion = Services.getCacheVersion(); Provider.Service service; ServiceCacheEntry cacheEntry = this.serviceCache; if (cacheEntry != null && cacheEntry.algorithm.equalsIgnoreCase(algorithm) && newCacheVersion == cacheEntry.cacheVersion) { service = cacheEntry.service; } else { if (Services.isEmpty()) { throw notFound(serviceName, algorithm); } String name = this.serviceName + "." + algorithm.toUpperCase(Locale.US); service = Services.getService(name); if (service == null) { throw notFound(serviceName, algorithm); } this.serviceCache = new ServiceCacheEntry(algorithm, newCacheVersion, service); } return new SpiAndProvider(service.newInstance(param), service.getProvider()); }
/** * Finds the appropriate service implementation and returns an * {@code SpiAndProvider} instance containing a reference to SPI * and its {@code Provider} */ public SpiAndProvider getInstance(String algorithm, Object param) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NoSuchAlgorithmException("Null algorithm name"); } int newCacheVersion = Services.getCacheVersion(); Provider.Service service; ServiceCacheEntry cacheEntry = this.serviceCache; if (cacheEntry != null && cacheEntry.algorithm.equalsIgnoreCase(algorithm) && newCacheVersion == cacheEntry.cacheVersion) { service = cacheEntry.service; } else { if (Services.isEmpty()) { throw notFound(serviceName, algorithm); } String name = this.serviceName + "." + algorithm.toUpperCase(Locale.US); service = Services.getService(name); if (service == null) { throw notFound(serviceName, algorithm); } this.serviceCache = new ServiceCacheEntry(algorithm, newCacheVersion, service); } return new SpiAndProvider(service.newInstance(param), service.getProvider()); }
/** * Finds the appropriate service implementation and returns an * {@code SpiAndProvider} instance containing a reference to SPI * and its {@code Provider} */ public SpiAndProvider getInstance(String algorithm, Object param) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NoSuchAlgorithmException("Null algorithm name"); } int newCacheVersion = Services.getCacheVersion(); Provider.Service service; ServiceCacheEntry cacheEntry = this.serviceCache; if (cacheEntry != null && cacheEntry.algorithm.equalsIgnoreCase(algorithm) && newCacheVersion == cacheEntry.cacheVersion) { service = cacheEntry.service; } else { if (Services.isEmpty()) { throw notFound(serviceName, algorithm); } String name = this.serviceName + "." + algorithm.toUpperCase(Locale.US); service = Services.getService(name); if (service == null) { throw notFound(serviceName, algorithm); } this.serviceCache = new ServiceCacheEntry(algorithm, newCacheVersion, service); } return new SpiAndProvider(service.newInstance(param), service.getProvider()); }
/** * Finds the appropriate service implementation and returns an * {@code SpiAndProvider} instance containing a reference to SPI * and its {@code Provider} */ public SpiAndProvider getInstance(String algorithm, Object param) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NoSuchAlgorithmException("Null algorithm name"); } int newCacheVersion = Services.getCacheVersion(); Provider.Service service; ServiceCacheEntry cacheEntry = this.serviceCache; if (cacheEntry != null && cacheEntry.algorithm.equalsIgnoreCase(algorithm) && newCacheVersion == cacheEntry.cacheVersion) { service = cacheEntry.service; } else { if (Services.isEmpty()) { throw notFound(serviceName, algorithm); } String name = this.serviceName + "." + algorithm.toUpperCase(Locale.US); service = Services.getService(name); if (service == null) { throw notFound(serviceName, algorithm); } this.serviceCache = new ServiceCacheEntry(algorithm, newCacheVersion, service); } return new SpiAndProvider(service.newInstance(param), service.getProvider()); }