Package java.security


packagejava.security
Provides the classes and interfaces for the security framework. This package also supports the generation and storage of cryptographic public key pairs, as well as a number of exportable cryptographic operations including those for message digest and signature generation. Finally, this package provides classes that support signed/guarded objects and secure random number generation. Many of the classes provided in this package (the cryptographic and secure random number generator classes in particular) are provider-based. The class itself defines a programming interface to which applications may write. The implementations themselves may then be written by independent third-party vendors and plugged in seamlessly as needed. Therefore, application developers may take advantage of any number of provider-based implementations without having to add or rewrite code.

Package Specification

Related Documentation

For further documentation, please see:
Since:
1.1
External Specifications
  • Related Packages
    Package
    Description
    Provides classes and interfaces for parsing and managing certificates, certificate revocation lists (CRLs), and certification paths.
    Provides interfaces for generating RSA (Rivest, Shamir and Adleman AsymmetricCipher algorithm) keys as defined in the RSA Laboratory Technical Note PKCS#1, and DSA (Digital Signature Algorithm) keys as defined in NIST's FIPS-186.
    Provides classes and interfaces for key specifications and algorithm parameter specifications.
  • Class
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class was only useful in conjunction with thethe Security Manager, which is no longer supported.
    Deprecated, for removal: This API element is subject to removal in a future version.
    This exception was only useful in conjunction withthe Security Manager, which is no longer supported.
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class was only useful in conjunction withthe Security Manager, which is no longer supported.
    This interface specifies constraints for cryptographic algorithms, keys (key sizes), and other algorithm parameters.
    TheAlgorithmParameterGenerator class is used to generate a set of parameters to be used with a certain algorithm.
    This class defines theService Provider Interface (SPI) for theAlgorithmParameterGenerator class, which is used to generate a set of parameters to be used with a certain algorithm.
    This class is used as an opaque representation of cryptographic parameters.
    This class defines theService Provider Interface (SPI) for theAlgorithmParameters class, which is used to manage algorithm parameters.
    TheAllPermission is a permission that implies all other permissions.
    An asymmetric key, which can be either a public key or a private key.
    This class defines login and logout methods for a provider.
    TheBasicPermission class extends thePermission class, and can be used as the base class for permissions that want to follow the same naming convention asBasicPermission.
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class is deprecated and subject to removal in a future version of Java SE.
    This class encapsulates information about a code signer.
    This class extends the concept of a codebase to encapsulate not only the location (URL) but also the certificate chains that were used to verify signed code originating from that location.
    An enumeration of cryptographic primitives.
    This is the generic Message Digest exception.
    A transparent stream that updates the associated message digest using the bits going through the stream.
    A transparent stream that updates the associated message digest using the bits going through the stream.
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class was only useful in conjunction withthe Security Manager, which is no longer supported.
    Configuration data that specifies the keystores in a keystore domain.
    This class specifies the parameters used by a DRBG (Deterministic Random Bit Generator).
    The reseedable and prediction resistance capabilities of a DRBG.
    DRBG parameters for instantiation.
    DRBG parameters for random bits generation.
    DRBG parameters for reseed.
    TheGeneralSecurityException class is a generic security exception class that provides type safety for all the security-related exception classes that extend from it.
    This interface represents a guard, which is an object that is used to protect access to another object.
    A GuardedObject is an object that is used to protect access to another object.
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class is deprecated and subject to removal in a future version of Java SE.
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class is deprecated and subject to removal in a future version of Java SE.
    This is the exception for invalid or inappropriate algorithm parameters.
    This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc.).
    This exception, designed for use by the JCA/JCE engine classes, is thrown when an invalid parameter is passed to a method.
    TheKey interface is the top-level interface for all keys.
    This is the basic key exception.
    Key factories are used to convertkeys (opaque cryptographic keys of typeKey) intokey specifications (transparent representations of the underlying key material), and vice versa.
    This class defines theService Provider Interface (SPI) for theKeyFactory class.
    This is the general key management exception for all operations dealing with key management.
    This class is a simple holder for a key pair (a public key and a private key).
    TheKeyPairGenerator class is used to generate pairs of public and private keys.
    This class defines theService Provider Interface (SPI) for theKeyPairGenerator class, which is used to generate pairs of public and private keys.
    Standardized representation for serialized Key objects.
    Key type.
    This class represents a storage facility for cryptographic keys and certificates.
    A description of a to-be-instantiatedKeyStore object.
    AProtectionParameter encapsulating a CallbackHandler.
    A marker interface forKeyStore entry types.
    An attribute associated with a keystore entry.
    A marker interface forKeyStoreload andstore parameters.
    A password-based implementation ofProtectionParameter.
    AKeyStore entry that holds aPrivateKey and corresponding certificate chain.
    A marker interface for keystore protection parameters.
    AKeyStore entry that holds aSecretKey.
    AKeyStore entry that holds a trustedCertificate.
    This is the generic KeyStore exception.
    This class defines theService Provider Interface (SPI) for theKeyStore class.
    ThisMessageDigest class provides applications the functionality of a message digest algorithm, such as SHA-1 or SHA-256.
    This class defines theService Provider Interface (SPI) for theMessageDigest class, which provides the functionality of a message digest algorithm, such as MD5 or SHA.
    This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
    This exception is thrown when a particular security provider is requested but is not available in the environment.
    Abstract class for representing access to a system resource.
    Abstract class representing a collection of Permission objects.
    This class represents a heterogeneous collection of permissions.
    An attribute associated with a PKCS12 keystore entry.
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class was only useful in conjunction withthe Security Manager, which is no longer supported.
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class was only useful in conjunction withthe Security Manager, which is no longer supported.
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class was only useful in conjunction withthe Security Manager, which is no longer supported.
    This interface represents the abstract notion of aPrincipal, which can be used to represent any entity, such as an individual, a corporation, and a login id.
    A private key.
    A computation to be performed by invokingAccessController.doPrivileged on thePrivilegedAction object.
    This exception is thrown bydoPrivileged(PrivilegedExceptionAction) anddoPrivileged(PrivilegedExceptionAction, AccessControlContext context) to indicate that the action being performed threw a checked exception.
    A computation to be performed that throws one or more checked exceptions.
    TheProtectionDomain class encapsulates the characteristics of a domain, which encloses a set of classes whose instances are granted a set of permissions.
    This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security.
    The description of a security service.
    A runtime exception forProvider exceptions (such as misconfiguration errors or unrecoverable internal errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors.
    A public key.
    This class extendsClassLoader with additional support for defining classes with an associated code source and permissions.
    This class provides a cryptographically strong random number generator (RNG).
    A marker interface for parameters used in variousSecureRandom methods.
    This class defines theService Provider Interface (SPI) for theSecureRandom class.
    This class centralizes all security properties and common security methods.
    This class is for security permissions.
    TheSignature class is used to provide applications the functionality of a digital signature algorithm.
    This is the generic Signature exception.
    This class defines theService Provider Interface (SPI) for theSignature class, which is used to provide the functionality of a digital signature algorithm.
    SignedObject is a class for the purpose of creating authentic runtime objects whose integrity cannot be compromised without being detected.
    Deprecated, for removal: This API element is subject to removal in a future version.
    This class is deprecated and subject to removal in a future version of Java SE.
    This class encapsulates information about a signed timestamp.
    This exception is thrown if an entry in the keystore cannot be recovered.
    This exception is thrown if a key in the keystore cannot be recovered.
    TheUnresolvedPermission class used to hold Permissions that were "unresolved" when thePolicy was initialized.
    A parameter that contains a URI pointing to data intended for a PolicySpi or ConfigurationSpi implementation.