jdk-20-ga : jdk-21+35
Module java.base
Package java.security

Class Provider

public abstract class Provider
extends java.util.Properties
Comparing jdk-20-ga and jdk-21+35
All Implemented Interfaces:
Serializable , Cloneable , Map<Object, Object>
Direct Known Subclasses:
AuthProvider

public abstract class Provider extends Properties
This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security. Services that a provider may implement include:
  • Algorithms (such as DSA, RSA, or SHA-256).
  • Key generation, conversion, and management facilities (such as for algorithm-specific keys).

Some provider implementations may encounter unrecoverable internal errors during their operation, for example a failure to communicate with a security token. A ProviderException should be used to indicate such errors.

Please note that a provider can be used to implement any security service in Java that uses a pluggable architecture with a choice of implementations that fit underneath.

The service type Provider is reserved for use by the security framework. Services of this type cannot be added, removed, or modified by applications. The following attributes are automatically placed in each Provider object:

Attributes Automatically Placed in a Provider Object
Name Value
Provider.id name String.valueOf(provider.getName())
Provider.id version String.valueOf(provider.getVersionStr())
Provider.id info String.valueOf(provider.getInfo())
Provider.id className provider.getClass().getName()

Each provider has a name and a version string. A provider normally identifies itself with a file named java.security.Provider in the resource directory META-INF/services . Security providers are looked up via the ServiceLoader mechanism using the application class loader .

Providers may be configured such that they are automatically installed and made available at runtime via the Security.getProviders() method. The mechanism for configuring and installing security providers is implementation-specific.

Implementation Note:
The JDK implementation supports static registration of the security providers via the conf/security/java.security file in the Java installation directory. These providers are automatically installed by the JDK runtime, see Moved out of a link with destination https://docs.oracle.com/pls/topic/lookup?ctx=javase20&id=security_guide_jca_provider.Moved to a link with destination https://docs.oracle.com/pls/topic/lookup?ctx=javase21&id=security_guide_jca_provider.The Provider ClassMoved out of a link with destination https://docs.oracle.com/pls/topic/lookup?ctx=javase20&id=security_guide_jca_provider.Moved to a link with destination https://docs.oracle.com/pls/topic/lookup?ctx=javase21&id=security_guide_jca_provider. in the Java Cryptography Architecture (JCA) Reference Guide for information about how a particular type of provider, the cryptographic service provider, works and is installed.
Since:
1.1
See Also:

Nested Types

Constructors

Methods

Serialized Form

serialVersionUID

-4298000515446427739

Serialized Fields

  • java.lang.String info
  • java.lang.String name
  • double version
  • java.lang.String versionStr

Serialization Methods

  • private void readObject(java.io.ObjectInputStream arg0) throws java.io.IOException, java.lang.ClassNotFoundException

Summary

Differences
Elements Comments Descriptions Total
Added Changed Removed Added Changed Removed Added Changed Removed
Provider 2 2
putService(Provider.Service) 1 1
Total 3 3