Java Doc for KeyStoreSpi.java in  » 6.0-JDK-Modules » j2me » java » security » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.security.KeyStoreSpi

All known Subclasses:   sun.security.provider.JavaKeyStore,
KeyStoreSpi
abstract public class KeyStoreSpi (Code)
This class defines the Service Provider Interface (SPI) for the KeyStore class. All the abstract methods in this class must be implemented by each cryptographic service provider who wishes to supply the implementation of a keystore for a particular keystore type.
author:
   Jan Luehe
version:
   1.9, 02/02/00
See Also:   KeyStore
since:
   1.2




Method Summary
abstract public  EnumerationengineAliases()
     Lists all the alias names of this keystore.
abstract public  booleanengineContainsAlias(String alias)
     Checks if the given alias exists in this keystore.
abstract public  voidengineDeleteEntry(String alias)
     Deletes the entry identified by the given alias from this keystore.
abstract public  CertificateengineGetCertificate(String alias)
     Returns the certificate associated with the given alias.

If the given alias name identifies a trusted certificate entry, the certificate associated with that entry is returned.

abstract public  StringengineGetCertificateAlias(Certificate cert)
     Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.

This method attempts to match the given certificate with each keystore entry.

abstract public  Certificate[]engineGetCertificateChain(String alias)
     Returns the certificate chain associated with the given alias.
abstract public  DateengineGetCreationDate(String alias)
     Returns the creation date of the entry identified by the given alias.
abstract public  KeyengineGetKey(String alias, char[] password)
     Returns the key associated with the given alias, using the given password to recover it.
abstract public  booleanengineIsCertificateEntry(String alias)
     Returns true if the entry identified by the given alias is a trusted certificate entry, and false otherwise.
abstract public  booleanengineIsKeyEntry(String alias)
     Returns true if the entry identified by the given alias is a key entry, and false otherwise.
abstract public  voidengineLoad(InputStream stream, char[] password)
     Loads the keystore from the given input stream.

If a password is given, it is used to check the integrity of the keystore data.

abstract public  voidengineSetCertificateEntry(String alias, Certificate cert)
     Assigns the given certificate to the given alias.
abstract public  voidengineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain)
     Assigns the given key to the given alias, protecting it with the given password.
abstract public  voidengineSetKeyEntry(String alias, byte[] key, Certificate[] chain)
     Assigns the given key (that has already been protected) to the given alias.
abstract public  intengineSize()
     Retrieves the number of entries in this keystore.
abstract public  voidengineStore(OutputStream stream, char[] password)
     Stores this keystore to the given output stream, and protects its integrity with the given password.



Method Detail
engineAliases
abstract public Enumeration engineAliases()(Code)
Lists all the alias names of this keystore. enumeration of the alias names



engineContainsAlias
abstract public boolean engineContainsAlias(String alias)(Code)
Checks if the given alias exists in this keystore.
Parameters:
  alias - the alias name true if the alias exists, false otherwise



engineDeleteEntry
abstract public void engineDeleteEntry(String alias) throws KeyStoreException(Code)
Deletes the entry identified by the given alias from this keystore.
Parameters:
  alias - the alias name
exception:
  KeyStoreException - if the entry cannot be removed.



engineGetCertificate
abstract public Certificate engineGetCertificate(String alias)(Code)
Returns the certificate associated with the given alias.

If the given alias name identifies a trusted certificate entry, the certificate associated with that entry is returned. If the given alias name identifies a key entry, the first element of the certificate chain of that entry is returned, or null if that entry does not have a certificate chain.
Parameters:
  alias - the alias name the certificate, or null if the given alias does not exist ordoes not contain a certificate.




engineGetCertificateAlias
abstract public String engineGetCertificateAlias(Certificate cert)(Code)
Returns the (alias) name of the first keystore entry whose certificate matches the given certificate.

This method attempts to match the given certificate with each keystore entry. If the entry being considered is a trusted certificate entry, the given certificate is compared to that entry's certificate. If the entry being considered is a key entry, the given certificate is compared to the first element of that entry's certificate chain (if a chain exists).
Parameters:
  cert - the certificate to match with. the (alias) name of the first entry with matching certificate,or null if no such entry exists in this keystore.




engineGetCertificateChain
abstract public Certificate[] engineGetCertificateChain(String alias)(Code)
Returns the certificate chain associated with the given alias.
Parameters:
  alias - the alias name the certificate chain (ordered with the user's certificate firstand the root certificate authority last), or null if the given aliasdoes not exist or does not contain a certificate chain (i.e., the givenalias identifies either a trusted certificate entry or akey entry without a certificate chain).



engineGetCreationDate
abstract public Date engineGetCreationDate(String alias)(Code)
Returns the creation date of the entry identified by the given alias.
Parameters:
  alias - the alias name the creation date of this entry, or null if the given alias doesnot exist



engineGetKey
abstract public Key engineGetKey(String alias, char[] password) throws NoSuchAlgorithmException, UnrecoverableKeyException(Code)
Returns the key associated with the given alias, using the given password to recover it.
Parameters:
  alias - the alias name
Parameters:
  password - the password for recovering the key the requested key, or null if the given alias does not existor does not identify a key entry.
exception:
  NoSuchAlgorithmException - if the algorithm for recovering thekey cannot be found
exception:
  UnrecoverableKeyException - if the key cannot be recovered(e.g., the given password is wrong).



engineIsCertificateEntry
abstract public boolean engineIsCertificateEntry(String alias)(Code)
Returns true if the entry identified by the given alias is a trusted certificate entry, and false otherwise.
Parameters:
  alias - the alias for the keystore entry to be checked true if the entry identified by the given alias is atrusted certificate entry, false otherwise.



engineIsKeyEntry
abstract public boolean engineIsKeyEntry(String alias)(Code)
Returns true if the entry identified by the given alias is a key entry, and false otherwise.
Parameters:
  alias - the alias for the keystore entry to be checked true if the entry identified by the given alias is akey entry, false otherwise.



engineLoad
abstract public void engineLoad(InputStream stream, char[] password) throws IOException, NoSuchAlgorithmException, CertificateException(Code)
Loads the keystore from the given input stream.

If a password is given, it is used to check the integrity of the keystore data. Otherwise, the integrity of the keystore is not checked.
Parameters:
  stream - the input stream from which the keystore is loaded
Parameters:
  password - the (optional) password used to check the integrity ofthe keystore.
exception:
  IOException - if there is an I/O or format problem with thekeystore data
exception:
  NoSuchAlgorithmException - if the algorithm used to checkthe integrity of the keystore cannot be found
exception:
  CertificateException - if any of the certificates in thekeystore could not be loaded




engineSetCertificateEntry
abstract public void engineSetCertificateEntry(String alias, Certificate cert) throws KeyStoreException(Code)
Assigns the given certificate to the given alias.

If the given alias already exists in this keystore and identifies a trusted certificate entry, the certificate associated with it is overridden by the given certificate.
Parameters:
  alias - the alias name
Parameters:
  cert - the certificate
exception:
  KeyStoreException - if the given alias already exists and doesnot identify a trusted certificate entry, or this operationfails for some other reason.




engineSetKeyEntry
abstract public void engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain) throws KeyStoreException(Code)
Assigns the given key to the given alias, protecting it with the given password.

If the given key is of type java.security.PrivateKey, it must be accompanied by a certificate chain certifying the corresponding public key.

If the given alias already exists, the keystore information associated with it is overridden by the given key (and possibly certificate chain).
Parameters:
  alias - the alias name
Parameters:
  key - the key to be associated with the alias
Parameters:
  password - the password to protect the key
Parameters:
  chain - the certificate chain for the corresponding publickey (only required if the given key is of typejava.security.PrivateKey).
exception:
  KeyStoreException - if the given key cannot be protected, orthis operation fails for some other reason




engineSetKeyEntry
abstract public void engineSetKeyEntry(String alias, byte[] key, Certificate[] chain) throws KeyStoreException(Code)
Assigns the given key (that has already been protected) to the given alias.

If the protected key is of type java.security.PrivateKey, it must be accompanied by a certificate chain certifying the corresponding public key.

If the given alias already exists, the keystore information associated with it is overridden by the given key (and possibly certificate chain).
Parameters:
  alias - the alias name
Parameters:
  key - the key (in protected format) to be associated with the alias
Parameters:
  chain - the certificate chain for the corresponding publickey (only useful if the protected key is of typejava.security.PrivateKey).
exception:
  KeyStoreException - if this operation fails.




engineSize
abstract public int engineSize()(Code)
Retrieves the number of entries in this keystore. the number of entries in this keystore



engineStore
abstract public void engineStore(OutputStream stream, char[] password) throws IOException, NoSuchAlgorithmException, CertificateException(Code)
Stores this keystore to the given output stream, and protects its integrity with the given password.
Parameters:
  stream - the output stream to which this keystore is written.
Parameters:
  password - the password to generate the keystore integrity check
exception:
  IOException - if there was an I/O problem with data
exception:
  NoSuchAlgorithmException - if the appropriate data integrityalgorithm could not be found
exception:
  CertificateException - if any of the certificates included inthe keystore data could not be stored



Methods inherited from java.lang.Object
public boolean equals(Object obj)(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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