Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

cryptix.jce.provider.dsa
Class SignatureData  view SignatureData download SignatureData.java

java.lang.Object
  extended bycryptix.jce.provider.dsa.SignatureData

class SignatureData
extends java.lang.Object

Reads and writes DER encoded DSA signatures.

DSA signatures are encoded as a DER sequence of two ASN.1 INTEGER values like this:

SEQUENCE { r INTEGER; s INTEGER }


Field Summary
private  java.math.BigInteger r
           
private  java.math.BigInteger s
           
 
Constructor Summary
SignatureData(java.math.BigInteger r, java.math.BigInteger s)
          Initializes the parser with the two numbers r and s.
SignatureData(byte[] data)
          Initializes the parser with a DER sequence.
 
Method Summary
 byte[] getData()
          Returns the encoded DER sequence
 java.math.BigInteger getR()
          Returns the decoded r
 java.math.BigInteger getS()
          Returns the decoded s
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

r

private java.math.BigInteger r

s

private java.math.BigInteger s
Constructor Detail

SignatureData

public SignatureData(byte[] data)
              throws java.security.SignatureException
Initializes the parser with a DER sequence. Use getR() and getS() to get the decoded numbers.


SignatureData

public SignatureData(java.math.BigInteger r,
                     java.math.BigInteger s)
              throws java.security.SignatureException
Initializes the parser with the two numbers r and s. Use getData() to get the encoded DER sequence.

Method Detail

getR

public java.math.BigInteger getR()
Returns the decoded r


getS

public java.math.BigInteger getS()
Returns the decoded s


getData

public byte[] getData()
Returns the encoded DER sequence