Home | History | Annotate | Download | only in crypto

Lines Matching refs:Provider

37 import java.security.Provider.Service;
59 * requested <i>transformation</i> to it. Optionally, the name of a provider
77 * provider-specific default values for the mode and padding scheme are used).
90 * number is specified, a provider-specific default is used. (For
91 * example, the SunJCE provider uses a default of 64 bits for DES.)
665 // The provider
666 private Provider provider;
668 // The provider implementation (delegate)
697 * @param provider the provider
701 Provider provider,
706 if (!(cipherSpi instanceof NullCipherSpi) && provider == null) {
707 throw new NullPointerException("provider == null");
711 this.provider = provider;
716 new SpiAndProviderUpdater(provider, cipherSpi);
720 Provider provider,
724 this.provider = provider;
729 new SpiAndProviderUpdater(provider, cipherSpi);
773 * starting with the most preferred Provider.
776 * Provider that supports the specified algorithm is returned.
792 * or if no Provider supports a CipherSpi implementation for the
798 * @see java.security.Provider
811 * CipherSpi implementation from the specified provider
812 * is returned. The specified provider must be registered
813 * in the security provider list.
825 * @param provider the name of the provider.
832 * is not available from the specified provider.
834 * @exception NoSuchProviderException if the specified provider is not
835 * registered in the security provider list.
840 * @exception IllegalArgumentException if the <code>provider</code>
843 * @see java.security.Provider
846 String provider)
850 if ((provider == null) || (provider.length() == 0)) {
851 throw new IllegalArgumentException("Missing provider");
853 Provider p = Security.getProvider(provider);
855 throw new NoSuchProviderException("No such provider: " +
856 provider);
866 * CipherSpi implementation from the specified Provider
867 * object is returned. Note that the specified Provider object
868 * does not have to be registered in the provider list.
877 * @param provider the provider.
884 * is not available from the specified Provider object.
889 * @exception IllegalArgumentException if the <code>provider</code>
892 * @see java.security.Provider
895 Provider provider)
898 if (provider == null) {
899 throw new IllegalArgumentException("Missing provider");
901 return createCipher(transformation, provider);
904 static final Cipher createCipher(String transformation, Provider provider)
911 tryCombinations(null /*params*/, provider, tokenizedTransformation);
918 if (provider == null) {
919 throw new NoSuchAlgorithmException("No provider found for " + transformation);
921 throw new NoSuchAlgorithmException("Provider " + provider.getName()
927 return new Cipher(null, provider, transformation, tokenizedTransformation);
931 * Choose the Spi from the first provider available. Used if
932 * delayed provider selection is not possible because init()
937 spiAndProviderUpdater.updateAndGetSpiAndProvider(null, spi, provider);
956 spiAndProviderUpdater.updateAndGetSpiAndProvider(initParams, spi, provider);
958 // no working provider found, fail
970 ("No installed provider supports this key: "
976 provider of this <code>Cipher</code> object.
978 * @return the provider of this <code>Cipher</code> object
980 public final Provider getProvider() {
982 return this.provider;
1103 * (using provider-specific default or random values) if it is being
1113 * provider-specific default values, initialization will
1120 * installed provider as the source of randomness.
1156 * (using provider-specific default or random values) if it is being
1166 * provider-specific default values, initialization will
1220 * provider-specific default or random values) if it is being
1230 * provider-specific default values, initialization will
1237 * installed provider as the source of randomness.
1281 * provider-specific default or random values) if it is being
1291 * provider-specific default values, initialization will
1346 * provider-specific default or random values) if it is being
1356 * provider-specific default values, initialization will
1363 * installed provider as the source of randomness.
1407 * provider-specific default or random values) if it is being
1417 * provider-specific default values, initialization will
1480 * (using provider-specific default or random values) if it is being
1490 * provider-specific default values, initialization will
1498 * installed provider as the source of randomness.
1550 * (using provider-specific default or random values) if it is being
1560 * provider-specific default values, initialization will
2678 static boolean matchAttribute(Provider.Service service, String attr, String value) {
2746 * The provider specified when instance created.
2748 private final Provider specifiedProvider;
2755 SpiAndProviderUpdater(Provider specifiedProvider, CipherSpi specifiedSpi) {
2760 void setCipherSpiImplAndProvider(CipherSpi cipherSpi, Provider provider) {
2762 Cipher.this.provider = provider;
2767 * {@code key != null} then it assumes that a suitable provider exists for
2777 Provider provider)
2780 return new CipherSpiAndProvider(specifiedSpi, provider);
2787 return new CipherSpiAndProvider(spiImpl, provider);
2792 throw new ProviderException("No provider found for "
2795 setCipherSpiImplAndProvider(sap.cipherSpi, sap.provider);
2796 return new CipherSpiAndProvider(sap.cipherSpi, sap.provider);
2803 CipherSpiAndProvider updateAndGetSpiAndProvider(CipherSpi spiImpl, Provider provider) {
2805 return updateAndGetSpiAndProvider(null, spiImpl, provider);
2838 * {@code provider != null}
2840 static CipherSpiAndProvider tryCombinations(InitParams initParams, Provider provider,
2864 if (provider != null) {
2866 Provider.Service service = provider.getService("Cipher", transform.name);
2874 for (Provider prov : Security.getProviders()) {
2876 Provider.Service service = prov.getService("Cipher", transform.name);
2905 throw new InvalidKeyException("No provider can be initialized with given key", cause);
2909 // Since the key is not null, a suitable provider exists,
2912 "No provider offers " + Arrays.toString(tokenizedTransformation) + " for "
2921 Provider provider;
2923 CipherSpiAndProvider(CipherSpi cipherSpi, Provider provider) {
2925 this.provider = provider;
2939 String[] tokenizedTransformation, NeedToSet type, Provider.Service service)
2953 if (sap.cipherSpi == null || sap.provider == null) {
2983 return new CipherSpiAndProvider(spi, sap.provider);