com.maverick.ssh.components.jce
Class Ssh2DsaPrivateKey

java.lang.Object
  extended by com.maverick.ssh.components.jce.Ssh2DsaPrivateKey
All Implemented Interfaces:
SshDsaPrivateKey, SshPrivateKey

public class Ssh2DsaPrivateKey
extends Object
implements SshDsaPrivateKey

DSA private key implementation for the SSH2 protocol.

Author:
Lee David Painter

Field Summary
protected  DSAPrivateKey prv
           
 
Constructor Summary
Ssh2DsaPrivateKey(BigInteger p, BigInteger q, BigInteger g, BigInteger x, BigInteger y)
           
Ssh2DsaPrivateKey(DSAPrivateKey prv, DSAPublicKey pub)
           
 
Method Summary
 String getAlgorithm()
           
 SshDsaPublicKey getPublicKey()
           
 BigInteger getX()
           
 byte[] sign(byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prv

protected DSAPrivateKey prv
Constructor Detail

Ssh2DsaPrivateKey

public Ssh2DsaPrivateKey(DSAPrivateKey prv,
                         DSAPublicKey pub)

Ssh2DsaPrivateKey

public Ssh2DsaPrivateKey(BigInteger p,
                         BigInteger q,
                         BigInteger g,
                         BigInteger x,
                         BigInteger y)
                  throws SshException
Throws:
SshException
Method Detail

sign

public byte[] sign(byte[] data)
            throws IOException
Specified by:
sign in interface SshDsaPrivateKey
Specified by:
sign in interface SshPrivateKey
Throws:
IOException

getAlgorithm

public String getAlgorithm()
Specified by:
getAlgorithm in interface SshPrivateKey

getPublicKey

public SshDsaPublicKey getPublicKey()
Specified by:
getPublicKey in interface SshDsaPrivateKey

getX

public BigInteger getX()
Specified by:
getX in interface SshDsaPrivateKey


Copyright © 2012. All Rights Reserved.