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


java.lang.Object
   java.security.Signature
      sun.security.provider.DSA

DSA
final public class DSA extends Signature (Code)
The Digital Signature Standard (using the Digital Signature Algorithm), as described in fips186 of the National Instute of Standards and Technology (NIST), using fips180-1 (SHA-1).
author:
   Benjamin Renaud
version:
   1.88, 02/02/00
See Also:   DSAPublicKey
See Also:   DSAPrivateKey



Constructor Summary
public  DSA()
     Construct a blank DSA object.

Method Summary
static  int[]SHA_7(int[] m1, int[] h)
     Computes set 1 thru 7 of SHA-1 on m1.
protected  ObjectengineGetParameter(String key)
     Return the value of the requested parameter.
protected  voidengineInitSign(PrivateKey privateKey)
     Initialize the DSA object with a DSA private key.
protected  voidengineInitVerify(PublicKey publicKey)
     Initialize the DSA object with a DSA public key.
protected  voidengineSetParameter(String key, Object param)
     This implementation recognizes the following parameter:
Kseed
a byte array.
protected  byte[]engineSign()
     Sign all the data thus far updated.
protected  voidengineUpdate(byte b)
     Update a byte to be signed or verified.
protected  voidengineUpdate(byte[] data, int off, int len)
     Update an array of bytes to be signed or verified.
protected  booleanengineVerify(byte[] signature)
     Verify all the data thus far updated.
protected  booleanengineVerify(byte[] signature, int offset, int length)
     Verify all the data thus far updated.
 BigIntegergenerateK(BigInteger q)
    
 BigIntegergenerateK(int[] seed, BigInteger q)
     Compute k for a DSA signature.
Parameters:
  seed - the seed for generating k.
 BigIntegergenerateR(BigInteger p, BigInteger q, BigInteger g, BigInteger k)
    
 BigIntegergenerateS(BigInteger x, BigInteger q, BigInteger r, BigInteger k)
    
 BigIntegergenerateV(BigInteger y, BigInteger p, BigInteger q, BigInteger g, BigInteger w, BigInteger r)
    
 BigIntegergenerateW(BigInteger p, BigInteger q, BigInteger g, BigInteger s)
    
public  StringtoString()
     Return a human readable rendition of the engine.


Constructor Detail
DSA
public DSA() throws NoSuchAlgorithmException(Code)
Construct a blank DSA object. It can generate keys, but must be initialized before being usable for signing or verifying.




Method Detail
SHA_7
static int[] SHA_7(int[] m1, int[] h)(Code)
Computes set 1 thru 7 of SHA-1 on m1.



engineGetParameter
protected Object engineGetParameter(String key)(Code)
Return the value of the requested parameter. Recognized parameters are:
Kseed
a byte array.
the value of the requested parameter.
See Also:   java.security.SignatureEngine
See Also:   



engineInitSign
protected void engineInitSign(PrivateKey privateKey) throws InvalidKeyException(Code)
Initialize the DSA object with a DSA private key.
Parameters:
  privateKey - the DSA private key
exception:
  InvalidKeyException - if the key is not a valid DSA privatekey.



engineInitVerify
protected void engineInitVerify(PublicKey publicKey) throws InvalidKeyException(Code)
Initialize the DSA object with a DSA public key.
Parameters:
  publicKey - the DSA public key.
exception:
  InvalidKeyException - if the key is not a valid DSA publickey.



engineSetParameter
protected void engineSetParameter(String key, Object param)(Code)
This implementation recognizes the following parameter:
Kseed
a byte array.



engineSign
protected byte[] engineSign() throws SignatureException(Code)
Sign all the data thus far updated. The signature is formatted according to the Canonical Encoding Rules, returned as a DER sequence of Integer, r and s. a signature block formatted according to the CanonicalEncoding Rules.
exception:
  SignatureException - if the signature object was notproperly initialized, or if another exception occurs.
See Also:   sun.security.DSA.engineUpdate
See Also:   sun.security.DSA.engineVerify



engineUpdate
protected void engineUpdate(byte b)(Code)
Update a byte to be signed or verified.
Parameters:
  b - the byte to updated.



engineUpdate
protected void engineUpdate(byte[] data, int off, int len)(Code)
Update an array of bytes to be signed or verified.
Parameters:
  data - the bytes to be updated.



engineVerify
protected boolean engineVerify(byte[] signature) throws SignatureException(Code)
Verify all the data thus far updated.
Parameters:
  signature - the alledged signature, encoded using theCanonical Encoding Rules, as a sequence of integers, r and s.
exception:
  SignatureException - if the signature object was notproperly initialized, or if another exception occurs.
See Also:   sun.security.DSA.engineUpdate
See Also:   sun.security.DSA.engineSign
See Also:   



engineVerify
protected boolean engineVerify(byte[] signature, int offset, int length) throws SignatureException(Code)
Verify all the data thus far updated.
Parameters:
  signature - the alledged signature, encoded using theCanonical Encoding Rules, as a sequence of integers, r and s.
Parameters:
  offset - the offset to start from in the array of bytes.
Parameters:
  length - the number of bytes to use, starting at offset.
exception:
  SignatureException - if the signature object was notproperly initialized, or if another exception occurs.
See Also:   sun.security.DSA.engineUpdate
See Also:   sun.security.DSA.engineSign
See Also:   



generateK
BigInteger generateK(BigInteger q)(Code)



generateK
BigInteger generateK(int[] seed, BigInteger q)(Code)
Compute k for a DSA signature.
Parameters:
  seed - the seed for generating k. This seed should besecure. This is what is refered to as the KSEED in the DSAspecification.
Parameters:
  g - the g parameter from the DSA key pair.



generateR
BigInteger generateR(BigInteger p, BigInteger q, BigInteger g, BigInteger k)(Code)



generateS
BigInteger generateS(BigInteger x, BigInteger q, BigInteger r, BigInteger k)(Code)



generateV
BigInteger generateV(BigInteger y, BigInteger p, BigInteger q, BigInteger g, BigInteger w, BigInteger r)(Code)



generateW
BigInteger generateW(BigInteger p, BigInteger q, BigInteger g, BigInteger s)(Code)



toString
public String toString()(Code)
Return a human readable rendition of the engine.



Methods inherited from java.security.Signature
public static Signature getInstance(String algorithm) throws NoSuchAlgorithmException(Code)(Java Doc)
final public void initVerify(PublicKey publicKey) throws InvalidKeyException(Code)(Java Doc)
final public void update(byte[] data, int off, int len) throws SignatureException(Code)(Java Doc)
final public boolean verify(byte[] signature) throws SignatureException(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.