java.security

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » 6.0 JDK Modules » j2me » java.security 
java.security
Provides the classes and interfaces for the security framework. This package 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.

SATSA Subset Description

This package is a subset of the java.security package in the Java 2 Platform, Standard Edition, version 1.4.2. @since SATSA1.0
Java Source File NameTypeComment
AccessControlContext.javaClass An AccessControlContext is used to make system resource access decisions based on the context it encapsulates.

More specifically, it encapsulates a context and has a single method, checkPermission, that is equivalent to the checkPermission method in the AccessController class, with one difference: The AccessControlContext checkPermission method makes access decisions based on the context it encapsulates, rather than that of the current execution thread.

Thus, the purpose of AccessControlContext is for those situations where a security check that should be made within a given context actually needs to be done from within a different context (for example, from within a worker thread).

An AccessControlContext is created by calling the AccessController.getContext method.

AccessControlException.javaClass

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.

The reason to deny access can vary.

AccessController.javaClass

The AccessController class is used for access control operations and decisions.

More specifically, the AccessController class is used for three purposes:

  • to decide whether an access to a critical system resource is to be allowed or denied, based on the security policy currently in effect,

  • to mark code as being "privileged", thus affecting subsequent access determinations, and

  • to obtain a "snapshot" of the current calling context so access-control decisions from a different context can be made with respect to the saved context.
AlgorithmParameterGenerator.javaClass The AlgorithmParameterGenerator class is used to generate a set of parameters to be used with a certain algorithm.
AlgorithmParameterGeneratorSpi.javaClass 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.javaClass This class is used as an opaque representation of cryptographic parameters.

An AlgorithmParameters object for managing the parameters for a particular algorithm can be obtained by calling one of the getInstance factory methods (static methods that return instances of a given class).

There are two ways to request such an implementation: by specifying either just an algorithm name, or both an algorithm name and a package provider.

AlgorithmParametersSpi.javaClass This class defines the Service Provider Interface (SPI) for the AlgorithmParameters class, which is used to manage algorithm parameters.
AllPermission.javaClass The AllPermission is a permission that implies all other permissions.

Note: Granting AllPermission should be done with extreme care, as it implies all other permissions.

BasicPermission.javaClass 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.

The name for a BasicPermission is the name of the given permission (for example, "exit", "setFactory", "print.queueJob", etc).

Certificate.javaInterface

This is an interface of abstract methods for managing a variety of identity certificates. An identity certificate is a guarantee by a principal that a public key is that of another principal.

CodeSource.javaClass

This class extends the concept of a codebase to encapsulate not only the location (URL) but also the certificate(s) that were used to verify signed code originating from that location.

DigestException.javaClass This is the generic Message Digest exception.
DigestInputStream.javaClass A transparent stream that updates the associated message digest using the bits going through the stream.

To complete the message digest computation, call one of the digest methods on the associated message digest after your calls to one of this digest input stream's DigestInputStream.read() read methods.

It is possible to turn this stream on or off (see DigestInputStream.on(boolean) on ).

DigestOutputStream.javaClass A transparent stream that updates the associated message digest using the bits going through the stream.

To complete the message digest computation, call one of the digest methods on the associated message digest after your calls to one of this digest ouput stream's DigestOutputStream.write(int) write methods.

It is possible to turn this stream on or off (see DigestOutputStream.on(boolean) on ).

DomainCombiner.javaInterface A DomainCombiner provides a means to dynamically update the ProtectionDomains associated with the current AccessControlContext.

A DomainCombiner is passed as a parameter to the appropriate constructor for AccessControlContext. The newly constructed context is then passed to the AccessController.doPrivileged(..., context) method to bind the provided context (and associated DomainCombiner) with the current execution Thread.

GeneralSecurityException.javaClass The GeneralSecurityException class is a generic security exception class that provides type safety for all the security-related exception classes that extend from it.
Guard.javaInterface

This interface represents a guard, which is an object that is used to protect access to another object.

This interface contains a single method, checkGuard, with a single object argument.

GuardedObject.javaClass A GuardedObject is an object that is used to protect access to another object.

A GuardedObject encapsulates a target object and a Guard object, such that access to the target object is possible only if the Guard object allows it. Once an object is encapsulated by a GuardedObject, access to that object is controlled by the getObject method, which invokes the checkGuard method on the Guard object that is guarding access.

Identity.javaClass

This class represents identities: real-world objects such as people, companies or organizations whose identities can be authenticated using their public keys.

IdentityScope.javaClass

This class represents a scope for identities.

InvalidAlgorithmParameterException.javaClass This is the exception for invalid or inappropriate algorithm parameters.
InvalidKeyException.javaClass This is the exception for invalid Keys (invalid encoding, wrong length, uninitialized, etc).
InvalidParameterException.javaClass This exception, designed for use by the JCA/JCE engine classes, is thrown when an invalid parameter is passed to a method.
Key.javaInterface The Key interface is the top-level interface for all keys.
KeyException.javaClass This is the basic key exception.
KeyFactory.javaClass Key factories are used to convert key specifications (transparent representations of the underlying key material) into keys (opaque cryptographic keys of type Key).
KeyFactorySpi.javaClass This class defines the Service Provider Interface (SPI) for the KeyFactory class. All the abstract methods in this class must be implemented by each cryptographic service provider who wishes to supply the implementation of a key factory for a particular algorithm.

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.

Key factories are bi-directional.

KeyManagementException.javaClass This is the general key management exception for all operations dealing with key management.
KeyPair.javaClass This class is a simple holder for a key pair (a public key and a private key).
KeyPairGenerator.javaClass The KeyPairGenerator class is used to generate pairs of public and private keys.
KeyPairGeneratorSpi.javaClass

This class defines the Service Provider Interface (SPI) for the KeyPairGenerator class, which is used to generate pairs of public and private keys.

KeyStore.javaClass This class represents an in-memory collection of keys and certificates. It manages two types of entries:
  • Key Entry

    This type of keystore entry holds very sensitive cryptographic key information, which is stored in a protected format to prevent unauthorized access.

    Typically, a key stored in this type of entry is a secret key, or a private key accompanied by the certificate chain for the corresponding public key.

    Private keys and certificate chains are used by a given entity for self-authentication.

KeyStoreException.javaClass This is the generic KeyStore exception.
KeyStoreSpi.javaClass This class defines the Service Provider Interface (SPI) for the KeyStore class.
MessageDigest.javaClass This MessageDigest class provides applications the functionality of a message digest algorithm, such as MD5 or SHA. Message digests are secure one-way hash functions that take arbitrary-sized data and output a fixed-length hash value.

A MessageDigest object starts out initialized.

MessageDigestSpi.javaClass 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.
NoSuchAlgorithmException.javaClass This exception is thrown when a particular cryptographic algorithm is requested but is not available in the environment.
NoSuchProviderException.javaClass This exception is thrown when a particular security provider is requested but is not available in the environment.
Permission.javaClass Abstract class for representing access to a system resource. All permissions have a name (whose interpretation depends on the subclass), as well as abstract functions for defining the semantics of the particular Permission subclass.
PermissionCollection.javaClass Abstract class representing a collection of Permission objects.

With a PermissionCollection, you can:

  • add a permission to the collection using the add method.
  • check to see if a particular permission is implied in the collection, using the implies method.
  • enumerate all the permissions, using the elements method.

When it is desirable to group together a number of Permission objects of the same type, the newPermissionCollection method on that particular type of Permission object should first be called.

Permissions.javaClass This class represents a heterogeneous collection of Permissions.
Policy.javaClass 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). That is, the security policy is represented by a Policy subclass providing an implementation of the abstract methods in this Policy class.

There is only one Policy object in effect at any given time.

The source location for the policy information utilized by the Policy object is up to the Policy implementation. The policy configuration may be stored, for example, as a flat ASCII file, as a serialized binary file of the Policy class, or as a database.

The currently-installed Policy object can be obtained by calling the getPolicy method, and it can be changed by a call to the setPolicy method (by code with permission to reset the Policy).

The refresh method causes the policy object to refresh/reload its current configuration.

This is implementation-dependent.

Principal.javaInterface 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.javaInterface

A private key.

PrivilegedAction.javaInterface A computation to be performed with privileges enabled.
PrivilegedActionException.javaClass This exception is thrown by doPrivileged(PrivilegedExceptionAction) and doPrivileged(PrivilegedExceptionAction, AccessControlContext context) to indicate that the action being performed threw a checked exception.
PrivilegedExceptionAction.javaInterface A computation to be performed with privileges enabled, that throws one or more checked exceptions.
ProtectionDomain.javaClass

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.

A static set of permissions can be bound to a ProtectionDomain when it is constructed; such permissions are granted to the domain regardless of the Policy in force.

Provider.javaClass This class represents a "provider" for the Java Security API, where a provider implements some or all parts of Java Security.
ProviderException.javaClass A runtime exception for Provider exceptions (such as misconfiguration errors), which may be subclassed by Providers to throw specialized, provider-specific runtime errors.
PublicKey.javaInterface

A public key.

SecureClassLoader.javaClass 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.javaClass

This class provides a cryptographically strong pseudo-random number generator (PRNG).

SecureRandomSpi.javaClass This class defines the Service Provider Interface (SPI) for the SecureRandom class.
Security.javaClass

This class centralizes all security properties and common security methods.

SecurityPermission.javaClass This class is for security permissions. A SecurityPermission contains a name (also referred to as a "target name") but no actions list; you either have the named permission or you don't.

The target name is the name of a security configuration parameter (see below). Currently the SecurityPermission object is used to guard access to the Policy, Security, Provider, Signer, and Identity objects. NOTE: java.security.Signer, java.security.Identity are found in J2ME CDC profiles such as J2ME Foundation Profile.

The following table lists all the possible SecurityPermission target names, and for each provides a description of what the permission allows and a discussion of the risks of granting code the permission.

Permission Target Name What the Permission Allows Risks of Allowing this Permission
createAccessControlContext Creation of an AccessControlContext This allows someone to instantiate an AccessControlContext with a DomainCombiner.
Signature.javaClass This Signature class is used to provide applications the functionality of a digital signature algorithm.
SignatureException.javaClass This is the generic Signature exception.
SignatureSpi.javaClass 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.javaClass

SignedObject is a class for the purpose of creating authentic runtime objects whose integrity cannot be compromised without being detected.

More specifically, a SignedObject contains another Serializable object, the (to-be-)signed object and its signature.

The signed object is a "deep copy" (in serialized form) of an original object.

Signer.javaClass This class is used to represent an Identity that can also digitally sign data.
UnrecoverableKeyException.javaClass This exception is thrown if a key in the keystore cannot be recovered.
UnresolvedPermission.javaClass The UnresolvedPermission class is used to hold Permissions that were "unresolved" when the Policy was initialized.
UnresolvedPermissionCollection.javaClass A UnresolvedPermissionCollection stores a collection of UnresolvedPermission permissions.

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.