Java Doc for XKMSUtil.java in  » Authentication-Authorization » ejbca » org » ejbca » core » protocol » xkms » common » 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 » Authentication Authorization » ejbca » org.ejbca.core.protocol.xkms.common 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.ejbca.core.protocol.xkms.common.XKMSUtil

XKMSUtil
public class XKMSUtil (Code)
A util class containing static help methods to process various XKMS messages
author:
   Philip Vendil 2006 dec 30
version:
   $Id: XKMSUtil.java,v 1.2 2007/02/02 09:37:48 anatom Exp $


Field Summary
final public static  byte[]KEY_AUTHENTICATION
    
final public static  byte[]KEY_PRIVATEKEYDATA
    
final public static  byte[]KEY_REVOCATIONCODEIDENTIFIER_PASS1
    
final public static  byte[]KEY_REVOCATIONCODEIDENTIFIER_PASS2
    


Method Summary
public static  DocumentappendKeyBindingAuthentication(Document requestDoc, String passphrase, String prototypeKeyBindingId)
    
public static  DocumentappendProofOfPossession(Document requestDoc, PrivateKey privateKey, String prototypeKeyBindingId)
    
public static  PrivateKeyTypegetEncryptedXMLFromPrivateKey(RSAPrivateCrtKey rSAPrivateKey, String sharedSecret)
     Encrypting a java RSA Private key into a PrivateKeyType object used in register,reissue and recover respolses. using the shared secret. The method uses the HMAC-SHA1 for generating the shared secret and tripple des for encryption
Parameters:
  rSAPrivateKey - the privatekey
Parameters:
  sharedSecret - the shared secret, cannot be null.
public static  RSAPrivateKeygetPrivateKeyFromEncryptedXML(PrivateKeyType privateKeyType, String sharedSecret)
     Method to get the private key from an XKMS message with an encrypted PrivateKey tag.
public static  SecretKeygetSecretKeyFromPassphrase(String passphrase, boolean performSASLprep, int keylength, byte[] keyType)
     Genereates a secret key from a passphrase according to the XKMS specifikation.

Field Detail
KEY_AUTHENTICATION
final public static byte[] KEY_AUTHENTICATION(Code)
HMAC-SHA1 initial key values



KEY_PRIVATEKEYDATA
final public static byte[] KEY_PRIVATEKEYDATA(Code)



KEY_REVOCATIONCODEIDENTIFIER_PASS1
final public static byte[] KEY_REVOCATIONCODEIDENTIFIER_PASS1(Code)



KEY_REVOCATIONCODEIDENTIFIER_PASS2
final public static byte[] KEY_REVOCATIONCODEIDENTIFIER_PASS2(Code)





Method Detail
appendKeyBindingAuthentication
public static Document appendKeyBindingAuthentication(Document requestDoc, String passphrase, String prototypeKeyBindingId) throws StringprepException, XMLSecurityException(Code)
Method appending a authorization keybinding element to a requestDoc
Parameters:
  requestDoc -
Parameters:
  passphrase -
Parameters:
  prototypeKeyBindingId - the requestDoc with authorization appended
throws:
  StringprepException - if the passphrase doesn't fullfull the SASLPrep profile
throws:
  XMLSecurityException - If any other exception occured during generation.



appendProofOfPossession
public static Document appendProofOfPossession(Document requestDoc, PrivateKey privateKey, String prototypeKeyBindingId) throws XMLSecurityException(Code)



getEncryptedXMLFromPrivateKey
public static PrivateKeyType getEncryptedXMLFromPrivateKey(RSAPrivateCrtKey rSAPrivateKey, String sharedSecret) throws StringprepException, XMLEncryptionException(Code)
Encrypting a java RSA Private key into a PrivateKeyType object used in register,reissue and recover respolses. using the shared secret. The method uses the HMAC-SHA1 for generating the shared secret and tripple des for encryption
Parameters:
  rSAPrivateKey - the privatekey
Parameters:
  sharedSecret - the shared secret, cannot be null. The Document with the encrypted key included.
throws:
  StringprepException - if the shared secret doesn't conform with the SASLprep profile as specified in the XKMS specification.
throws:
  XMLEncryptionException - if any other exception occurs during the processing.



getPrivateKeyFromEncryptedXML
public static RSAPrivateKey getPrivateKeyFromEncryptedXML(PrivateKeyType privateKeyType, String sharedSecret) throws StringprepException, XMLEncryptionException(Code)
Method to get the private key from an XKMS message with an encrypted PrivateKey tag. The method uses the HMAC-SHA1 for generating the shared secret and tripple des for encryption.
Parameters:
  privateKeyType - the JAXB version of the PrivateKey tag
Parameters:
  sharedSecret - the shared secret, cannot be null. a java RSAPrivateKey
throws:
  StringprepException - if the shared secret doesn't conform with the SASLprep profile as specified in the XKMS specification.
throws:
  XMLEncryptionException - if any other exception occurs during the processing.



getSecretKeyFromPassphrase
public static SecretKey getSecretKeyFromPassphrase(String passphrase, boolean performSASLprep, int keylength, byte[] keyType) throws StringprepException, XMLEncryptionException(Code)
Genereates a secret key from a passphrase according to the XKMS specifikation. The HMAC-SHA1 algorithm is used. The passphrase is first checked against SALSPrep profile according to the XKMS specificatiom
Parameters:
  passphrase - the passphrase to use, may no be null
Parameters:
  performSASLprep - if sASLprep should be called on the input string.
Parameters:
  keylength - the length of the key returned.
Parameters:
  keyType - one of the initial KEY_ constants The SecretKey used in encryption/decryption
throws:
  StringprepException - if the passphrase doesn't fullfull the SASLPrep profile
throws:
  XMLEncryptionException - If any other exception occured during generation.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(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.