Java Doc for AlgIdDSA.java in  » 6.0-JDK-Modules » j2me » sun » security » x509 » 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 » sun.security.x509 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   sun.security.x509.AlgorithmId
      sun.security.x509.AlgIdDSA

AlgIdDSA
final public class AlgIdDSA extends AlgorithmId implements DSAParams(Code)
This class identifies DSS/DSA Algorithm variants, which are distinguished by using different algorithm parameters P, Q, G. It uses the NIST/IETF standard DER encoding. These are used to implement the Digital Signature Standard (DSS), FIPS 186.

NOTE: DSS/DSA Algorithm IDs may be created without these parameters. Use of DSS/DSA in modes where parameters are either implicit (e.g. a default applicable to a site or a larger scope), or are derived from some Certificate Authority's DSS certificate, is not supported directly. The application is responsible for creating a key containing the required parameters prior to using the key in cryptographic operations. The follwoing is an example of how this may be done assuming that we have a certificate called currentCert which doesn't contain DSS/DSA parameters and we need to derive DSS/DSA parameters from a CA's certificate called caCert.

 // key containing parameters to use
 DSAPublicKey cAKey = (DSAPublicKey)(caCert.getPublicKey());
 // key without parameters
 DSAPublicKey nullParamsKey = (DSAPublicKey)(currentCert.getPublicKey()); 
 DSAParams cAKeyParams = cAKey.getParams();
 KeyFactory kf = KeyFactory.getInstance("DSA");
 DSAPublicKeySpec ks = new DSAPublicKeySpec(nullParamsKey.getY(),
 cAKeyParams.getP(),
 cAKeyParams.getQ(),
 cAKeyParams.getG());
 DSAPublicKey usableKey = kf.generatePublic(ks);
 

See Also:   java.security.interfaces.DSAParams
See Also:   java.security.interfaces.DSAPublicKey
See Also:   java.security.KeyFactory
See Also:   java.security.spec.DSAPublicKeySpec
version:
   1.42, 10/10/06
author:
   David Brownell



Constructor Summary
public  AlgIdDSA()
     Default constructor.
 AlgIdDSA(DerValue val)
    
public  AlgIdDSA(byte[] encodedAlg)
     Construct an AlgIdDSA from an X.509 encoded byte array.
public  AlgIdDSA(byte p, byte q, byte g)
     Constructs a DSS/DSA Algorithm ID from unsigned integers that define the algorithm parameters.
public  AlgIdDSA(BigInteger p, BigInteger q, BigInteger g)
     Constructs a DSS/DSA Algorithm ID from numeric parameters. If all three are null, then the parameters portion of the algorithm id is set to null.

Method Summary
protected  voiddecodeParams()
     Parses algorithm parameters P, Q, and G.
public  BigIntegergetG()
    
public  StringgetName()
     Returns "DSA", indicating the Digital Signature Algorithm (DSA) as defined by the Digital Signature Standard (DSS), FIPS 186.
public  BigIntegergetP()
    
public  BigIntegergetQ()
    
protected  StringparamsToString()
    
public  StringtoString()
    


Constructor Detail
AlgIdDSA
public AlgIdDSA()(Code)
Default constructor. The OID and parameters must be deserialized before this algorithm ID is used.



AlgIdDSA
AlgIdDSA(DerValue val) throws IOException(Code)



AlgIdDSA
public AlgIdDSA(byte[] encodedAlg) throws IOException(Code)
Construct an AlgIdDSA from an X.509 encoded byte array.



AlgIdDSA
public AlgIdDSA(byte p, byte q, byte g) throws IOException(Code)
Constructs a DSS/DSA Algorithm ID from unsigned integers that define the algorithm parameters. Those integers are encoded as big-endian byte arrays.
Parameters:
  p - the DSS/DSA paramter "P"
Parameters:
  q - the DSS/DSA paramter "Q"
Parameters:
  g - the DSS/DSA paramter "G"



AlgIdDSA
public AlgIdDSA(BigInteger p, BigInteger q, BigInteger g)(Code)
Constructs a DSS/DSA Algorithm ID from numeric parameters. If all three are null, then the parameters portion of the algorithm id is set to null. See note in header regarding use.
Parameters:
  p - the DSS/DSA paramter "P"
Parameters:
  q - the DSS/DSA paramter "Q"
Parameters:
  g - the DSS/DSA paramter "G"




Method Detail
decodeParams
protected void decodeParams() throws IOException(Code)
Parses algorithm parameters P, Q, and G. They're found in the "params" member, which never needs to be changed.



getG
public BigInteger getG()(Code)
Returns the DSS/DSA parameter "G"



getName
public String getName()(Code)
Returns "DSA", indicating the Digital Signature Algorithm (DSA) as defined by the Digital Signature Standard (DSS), FIPS 186.



getP
public BigInteger getP()(Code)
Returns the DSS/DSA parameter "P"



getQ
public BigInteger getQ()(Code)
Returns the DSS/DSA parameter "Q"



paramsToString
protected String paramsToString()(Code)



toString
public String toString()(Code)



Fields inherited from sun.security.x509.AlgorithmId
public static ObjectIdentifier DH_PKIX_oid(Code)(Java Doc)
public static ObjectIdentifier DH_oid(Code)(Java Doc)
public static ObjectIdentifier DSA_OIW_oid(Code)(Java Doc)
public static ObjectIdentifier DSA_oid(Code)(Java Doc)
public static ObjectIdentifier MD2_oid(Code)(Java Doc)
public static ObjectIdentifier MD5_oid(Code)(Java Doc)
public static ObjectIdentifier RSAEncryption_oid(Code)(Java Doc)
public static ObjectIdentifier RSA_oid(Code)(Java Doc)
public static ObjectIdentifier SHA1_OIW_oid(Code)(Java Doc)
public static ObjectIdentifier SHA5_oid(Code)(Java Doc)
public static ObjectIdentifier SHA_oid(Code)(Java Doc)
public static ObjectIdentifier md2WithRSAEncryption_oid(Code)(Java Doc)
public static ObjectIdentifier md5WithRSAEncryption_oid(Code)(Java Doc)
protected DerValue params(Code)(Java Doc)
public static ObjectIdentifier sha1WithDSA_OIW_oid(Code)(Java Doc)
public static ObjectIdentifier sha1WithDSA_oid(Code)(Java Doc)
public static ObjectIdentifier sha1WithRSAEncryption_OIW_oid(Code)(Java Doc)
public static ObjectIdentifier sha1WithRSAEncryption_oid(Code)(Java Doc)
public static ObjectIdentifier shaWithDSA_OIW_oid(Code)(Java Doc)

Methods inherited from sun.security.x509.AlgorithmId
protected void decodeParams() throws IOException(Code)(Java Doc)
public void derEncode(OutputStream out) throws IOException(Code)(Java Doc)
final public void encode(DerOutputStream out) throws IOException(Code)(Java Doc)
final public byte[] encode() throws IOException(Code)(Java Doc)
public boolean equals(AlgorithmId other)(Code)(Java Doc)
public boolean equals(Object other)(Code)(Java Doc)
final public boolean equals(ObjectIdentifier id)(Code)(Java Doc)
public static AlgorithmId get(String algname) throws NoSuchAlgorithmException(Code)(Java Doc)
public static AlgorithmId get(AlgorithmParameters algparams) throws NoSuchAlgorithmException(Code)(Java Doc)
public static AlgorithmId getAlgorithmId(String algname) throws NoSuchAlgorithmException(Code)(Java Doc)
public byte[] getEncodedParams() throws IOException(Code)(Java Doc)
public String getName()(Code)(Java Doc)
final public ObjectIdentifier getOID()(Code)(Java Doc)
public AlgorithmParameters getParameters()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
protected String paramsToString()(Code)(Java Doc)
public static AlgorithmId parse(DerValue val) throws IOException(Code)(Java Doc)
public String toString()(Code)(Java Doc)

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.