net.i2p.crypto
Class DSAEngine

java.lang.Object
  extended by net.i2p.crypto.DSAEngine
Direct Known Subclasses:
DummyDSAEngine

public class DSAEngine
extends java.lang.Object


Constructor Summary
DSAEngine(I2PAppContext context)
           
 
Method Summary
static Hash calculateHash(byte[] source, int offset, int len)
           
 Hash calculateHash(java.io.InputStream in)
           
static DSAEngine getInstance()
           
static void main(java.lang.String[] args)
           
 Signature sign(byte[] data, int offset, int length, SigningPrivateKey signingKey)
           
 Signature sign(byte[] data, SigningPrivateKey signingKey)
           
 Signature sign(Hash hash, SigningPrivateKey signingKey)
           
 Signature sign(java.io.InputStream in, SigningPrivateKey signingKey)
           
 boolean verifySignature(Signature signature, byte[] signedData, int offset, int size, SigningPublicKey verifyingKey)
           
 boolean verifySignature(Signature signature, byte[] signedData, SigningPublicKey verifyingKey)
           
 boolean verifySignature(Signature signature, Hash hash, SigningPublicKey verifyingKey)
           
 boolean verifySignature(Signature signature, java.io.InputStream in, SigningPublicKey verifyingKey)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DSAEngine

public DSAEngine(I2PAppContext context)
Method Detail

getInstance

public static DSAEngine getInstance()

verifySignature

public boolean verifySignature(Signature signature,
                               byte[] signedData,
                               SigningPublicKey verifyingKey)

verifySignature

public boolean verifySignature(Signature signature,
                               byte[] signedData,
                               int offset,
                               int size,
                               SigningPublicKey verifyingKey)

verifySignature

public boolean verifySignature(Signature signature,
                               java.io.InputStream in,
                               SigningPublicKey verifyingKey)

verifySignature

public boolean verifySignature(Signature signature,
                               Hash hash,
                               SigningPublicKey verifyingKey)

sign

public Signature sign(byte[] data,
                      SigningPrivateKey signingKey)

sign

public Signature sign(byte[] data,
                      int offset,
                      int length,
                      SigningPrivateKey signingKey)

sign

public Signature sign(java.io.InputStream in,
                      SigningPrivateKey signingKey)

sign

public Signature sign(Hash hash,
                      SigningPrivateKey signingKey)

calculateHash

public Hash calculateHash(java.io.InputStream in)

calculateHash

public static Hash calculateHash(byte[] source,
                                 int offset,
                                 int len)

main

public static void main(java.lang.String[] args)