Package java.security

Interface Summary
Certificate sample code for java.security.Certificate definition code for java.security.Certificate Deprecated. A new certificate handling package is created in the Java 2 platform.
DomainCombiner sample code for java.security.DomainCombiner definition code for java.security.DomainCombiner A DomainCombiner provides a means to dynamically update the ProtectionDomains associated with the current AccessControlContext.
Guard sample code for java.security.Guard definition code for java.security.Guard This interface represents a guard, which is an object that is used to protect access to another object.
Key sample code for java.security.Key definition code for java.security.Key The Key interface is the top-level interface for all keys.
KeyStore.Entry sample code for java.security.KeyStore.Entry definition code for java.security.KeyStore.Entry A marker interface for KeyStore entry types.
KeyStore.LoadStoreParameter sample code for java.security.KeyStore.LoadStoreParameter definition code for java.security.KeyStore.LoadStoreParameter A marker interface for KeyStore load sample code for java.security.KeyStore.load(java.security.KeyStore.LoadStoreParameter) definition code for java.security.KeyStore.load(java.security.KeyStore.LoadStoreParameter) and store sample code for java.security.KeyStore.store(java.security.KeyStore.LoadStoreParameter) definition code for java.security.KeyStore.store(java.security.KeyStore.LoadStoreParameter) parameters.
KeyStore.ProtectionParameter sample code for java.security.KeyStore.ProtectionParameter definition code for java.security.KeyStore.ProtectionParameter A marker interface for keystore protection parameters.
Principal sample code for java.security.Principal definition code for java.security.Principal This interface represents the abstract notion of a principal, which can be used to represent any entity, such as an individual, a corporation, and a login id.
PrivateKey sample code for java.security.PrivateKey definition code for java.security.PrivateKey A private key.
PrivilegedAction<T> sample code for java.security.PrivilegedAction definition code for java.security.PrivilegedAction A computation to be performed with privileges enabled.
PrivilegedExceptionAction<T> sample code for java.security.PrivilegedExceptionAction definition code for java.security.PrivilegedExceptionAction A computation to be performed with privileges enabled, that throws one or more checked exceptions.
PublicKey sample code for java.security.PublicKey definition code for java.security.PublicKey A public key.
 

Class Summary
AccessControlContext sample code for java.security.AccessControlContext definition code for java.security.AccessControlContext An AccessControlContext is used to make system resource access decisions based on the context it encapsulates.
AccessController sample code for java.security.AccessController definition code for java.security.AccessController The AccessController class is used for access control operations and decisions.
AlgorithmParameterGenerator sample code for java.security.AlgorithmParameterGenerator definition code for java.security.AlgorithmParameterGenerator The AlgorithmParameterGenerator class is used to generate a set of parameters to be used with a certain algorithm.
AlgorithmParameterGeneratorSpi sample code for java.security.AlgorithmParameterGeneratorSpi definition code for java.security.AlgorithmParameterGeneratorSpi This class defines the Service Provider Interface (SPI) for the AlgorithmParameterGenerator class, which is used to generate a set of parameters to be used with a certain algorithm.
AlgorithmParameters sample code for java.security.AlgorithmParameters definition code for java.security.AlgorithmParameters This class is used as an opaque representation of cryptographic parameters.
AlgorithmParametersSpi sample code for java.security.AlgorithmParametersSpi definition code for java.security.AlgorithmParametersSpi This class defines the Service Provider Interface (SPI) for the AlgorithmParameters class, which is used to manage algorithm parameters.
AllPermission sample code for java.security.AllPermission definition code for java.security.AllPermission The AllPermission is a permission that implies all other permissions.
AuthProvider sample code for java.security.AuthProvider definition code for java.security.AuthProvider This class defines login and logout methods for a provider.
BasicPermission sample code for java.security.BasicPermission definition code for java.security.BasicPermission The BasicPermission class extends the Permission class, and can be used as the base class for permissions that want to follow the same naming convention as BasicPermission.
CodeSigner sample code for java.security.CodeSigner definition code for java.security.CodeSigner This class encapsulates information about a code signer.
CodeSource sample code for java.security.CodeSource definition code for java.security.CodeSource 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.
DigestInputStream sample code for java.security.DigestInputStream definition code for java.security.DigestInputStream A transparent stream that updates the associated message digest using the bits going through the stream.
DigestOutputStream sample code for java.security.DigestOutputStream definition code for java.security.DigestOutputStream A transparent stream that updates the associated message digest using the bits going through the stream.
GuardedObject sample code for java.security.GuardedObject definition code for java.security.GuardedObject A GuardedObject is an object that is used to protect access to another object.
Identity sample code for java.security.Identity definition code for java.security.Identity Deprecated. This class is no longer used.
IdentityScope sample code for java.security.IdentityScope definition code for java.security.IdentityScope Deprecated. This class is no longer used.
KeyFactory sample code for java.security.KeyFactory definition code for java.security.KeyFactory Key factories are used to convert keys (opaque cryptographic keys of type Key) into key specifications (transparent representations of the underlying key material), and vice versa.
KeyFactorySpi sample code for java.security.KeyFactorySpi definition code for java.security.KeyFactorySpi This class defines the Service Provider Interface (SPI) for the KeyFactory class.
KeyPair sample code for java.security.KeyPair definition code for java.security.KeyPair This class is a simple holder for a key pair (a public key and a private key).
KeyPairGenerator sample code for java.security.KeyPairGenerator definition code for java.security.KeyPairGenerator The KeyPairGenerator class is used to generate pairs of public and private keys.
KeyPairGeneratorSpi sample code for java.security.KeyPairGeneratorSpi definition code for java.security.KeyPairGeneratorSpi This class defines the Service Provider Interface (SPI) for the KeyPairGenerator class, which is used to generate pairs of public and private keys.
KeyRep sample code for java.security.KeyRep definition code for java.security.KeyRep Standardized representation for serialized Key objects.
KeyStore sample code for java.security.KeyStore definition code for java.security.KeyStore This class represents a storage facility for cryptographic keys and certificates.
KeyStore.Builder sample code for java.security.KeyStore.Builder definition code for java.security.KeyStore.Builder A description of a to-be-instantiated KeyStore object.
KeyStore.CallbackHandlerProtection sample code for java.security.KeyStore.CallbackHandlerProtection definition code for java.security.KeyStore.CallbackHandlerProtection A ProtectionParameter encapsulating a CallbackHandler.
KeyStore.PasswordProtection sample code for java.security.KeyStore.PasswordProtection definition code for java.security.KeyStore.PasswordProtection A password-based implementation of ProtectionParameter.
KeyStore.PrivateKeyEntry sample code for java.security.KeyStore.PrivateKeyEntry definition code for java.security.KeyStore.PrivateKeyEntry A KeyStore entry that holds a PrivateKey and corresponding certificate chain.
KeyStore.SecretKeyEntry sample code for java.security.KeyStore.SecretKeyEntry definition code for java.security.KeyStore.SecretKeyEntry A KeyStore entry that holds a SecretKey.
KeyStore.TrustedCertificateEntry sample code for java.security.KeyStore.TrustedCertificateEntry definition code for java.security.KeyStore.TrustedCertificateEntry A KeyStore entry that holds a trusted Certificate.
KeyStoreSpi sample code for java.security.KeyStoreSpi definition code for java.security.KeyStoreSpi This class defines the Service Provider Interface (SPI) for the KeyStore class.
MessageDigest sample code for java.security.MessageDigest definition code for java.security.MessageDigest This MessageDigest class provides applications the functionality of a message digest algorithm, such as MD5 or SHA.
MessageDigestSpi sample code for java.security.MessageDigestSpi definition code for java.security.MessageDigestSpi This class defines the Service Provider Interface (SPI) for the MessageDigest class, which provides the functionality of a message digest algorithm, such as MD5 or SHA.
Permission sample code for java.security.Permission definition code for java.security.Permission Abstract class for representing access to a system resource.
PermissionCollection sample code for java.security.PermissionCollection definition code for java.security.PermissionCollection Abstract class representing a collection of Permission objects.
Permissions sample code for java.security.Permissions definition code for java.security.Permissions This class represents a heterogeneous collection of Permissions.
Policy sample code for java.security.Policy definition code for java.security.Policy This is an abstract class for representing the system security policy for a Java application environment (specifying which permissions are available for code from various sources).
ProtectionDomain sample code for java.security.ProtectionDomain definition code for java.security.ProtectionDomain This ProtectionDomain class encapsulates the characteristics of a domain, which encloses a set of classes whose instances are granted a set of permissions when being executed on behalf of a given set of Principals.
Provider sample code for java.security.Provider definition code for java.security.Provider This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security.
Provider.Service sample code for java.security.Provider.Service definition code for java.security.Provider.Service The description of a security service.
SecureClassLoader sample code for java.security.SecureClassLoader definition code for java.security.SecureClassLoader This class extends ClassLoader with additional support for defining classes with an associated code source and permissions which are retrieved by the system policy by default.
SecureRandom sample code for java.security.SecureRandom definition code for java.security.SecureRandom This class provides a cryptographically strong random number generator (RNG).
SecureRandomSpi sample code for java.security.SecureRandomSpi definition code for java.security.SecureRandomSpi This class defines the Service Provider Interface (SPI) for the SecureRandom class.
Security sample code for java.security.Security definition code for java.security.Security This class centralizes all security properties and common security methods.
SecurityPermission sample code for java.security.SecurityPermission definition code for java.security.SecurityPermission This class is for security permissions.
Signature sample code for java.security.Signature definition code for java.security.Signature This Signature class is used to provide applications the functionality of a digital signature algorithm.
SignatureSpi sample code for java.security.SignatureSpi definition code for java.security.SignatureSpi This class defines the Service Provider Interface (SPI) for the Signature class, which is used to provide the functionality of a digital signature algorithm.
SignedObject sample code for java.security.SignedObject definition code for java.security.SignedObject SignedObject is a class for the purpose of creating authentic runtime objects whose integrity cannot be compromised without being detected.
Signer sample code for java.security.Signer definition code for java.security.Signer Deprecated. This class is no longer used.
Timestamp sample code for java.security.Timestamp definition code for java.security.Timestamp This class encapsulates information about a signed timestamp.
UnresolvedPermission sample code for java.security.UnresolvedPermission definition code for java.security.UnresolvedPermission The UnresolvedPermission class is used to hold Permissions that were "unresolved" when the Policy was initialized.
 

Enum Summary
KeyRep.Type sample code for java.security.KeyRep.Type definition code for java.security.KeyRep.Type Key type.
 

Exception Summary
AccessControlException sample code for java.security.AccessControlException definition code for java.security.AccessControlException This exception is thrown by the AccessController to indicate that a requested access (to a critical system resource such as the file system or the network) is denied.
DigestException sample code for java.security.DigestException definition code for java.security.DigestException This is the generic Message Digest exception.
GeneralSecurityException sample code for java.security.GeneralSecurityException definition code for java.security.GeneralSecurityException The GeneralSecurityException class is a generic security exception class that provides type safety for all the security-related exception classes that extend from it.
InvalidAlgorithmParameterException sample code for java.security.InvalidAlgorithmParameterException definition code for java.security.InvalidAlgorithmParameterException This is the exception for invalid or inappropriate algorithm parameters.
InvalidKeyException sample code for java.security.InvalidKeyException definition code for java.security.InvalidKeyException This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).
InvalidParameterException sample code for java.security.InvalidParameterException definition code for java.security.InvalidParameterException This exception, designed for use by the JCA/JCE engine classes, is thrown when an invalid parameter is passed to a method.
KeyException sample code for java.security.KeyException definition code for java.security.KeyException This is the basic key exception.
KeyManagementException sample code for java.security.KeyManagementException definition code for java.security.KeyManagementException This is the general key management exception for all operations dealing with key management.
KeyStoreException sample code for java.security.KeyStoreException definition code for java.security.KeyStoreException This is the generic KeyStore exception.
NoSuchAlgorithmException sample code for java.security.NoSuchAlgorithmException definition code for java.security.NoSuchAlgorithmException This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
NoSuchProviderException sample code for java.security.NoSuchProviderException definition code for java.security.NoSuchProviderException This exception is thrown when a particular security provider is requested but is not available in the environment.
PrivilegedActionException sample code for java.security.PrivilegedActionException definition code for java.security.PrivilegedActionException This exception is thrown by doPrivileged(PrivilegedExceptionAction) and doPrivileged(PrivilegedExceptionAction, AccessControlContext context) to indicate that the action being performed threw a checked exception.
ProviderException sample code for java.security.ProviderException definition code for java.security.ProviderException A runtime exception for Provider exceptions (such as misconfiguration errors or unrecoverable internal errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors.
SignatureException sample code for java.security.SignatureException definition code for java.security.SignatureException This is the generic Signature exception.
UnrecoverableEntryException sample code for java.security.UnrecoverableEntryException definition code for java.security.UnrecoverableEntryException This exception is thrown if an entry in the keystore cannot be recovered.
UnrecoverableKeyException sample code for java.security.UnrecoverableKeyException definition code for java.security.UnrecoverableKeyException This exception is thrown if a key in the keystore cannot be recovered.