com.maverick.ssh.components.jce
Class Ssh2RsaPrivateKey

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

public class Ssh2RsaPrivateKey
extends Object
implements SshRsaPrivateKey

RSA private key implementation for the SSH2 protocol.

Author:
Lee David Painter

Field Summary
protected  RSAPrivateKey prv
           
 
Constructor Summary
Ssh2RsaPrivateKey(BigInteger modulus, BigInteger privateExponent)
           
Ssh2RsaPrivateKey(RSAPrivateKey prv)
           
 
Method Summary
 String getAlgorithm()
           
 BigInteger getModulus()
           
 BigInteger getPrivateExponent()
           
 byte[] sign(byte[] data)
          Create a signature from the data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prv

protected RSAPrivateKey prv
Constructor Detail

Ssh2RsaPrivateKey

public Ssh2RsaPrivateKey(RSAPrivateKey prv)

Ssh2RsaPrivateKey

public Ssh2RsaPrivateKey(BigInteger modulus,
                         BigInteger privateExponent)
                  throws NoSuchAlgorithmException,
                         InvalidKeySpecException
Throws:
NoSuchAlgorithmException
InvalidKeySpecException
Method Detail

sign

public byte[] sign(byte[] data)
            throws IOException
Description copied from interface: SshPrivateKey
Create a signature from the data.

Specified by:
sign in interface SshPrivateKey
Specified by:
sign in interface SshRsaPrivateKey
Returns:
byte[]
Throws:
IOException

getAlgorithm

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

getModulus

public BigInteger getModulus()
Specified by:
getModulus in interface SshRsaPrivateKey

getPrivateExponent

public BigInteger getPrivateExponent()
Specified by:
getPrivateExponent in interface SshRsaPrivateKey


Copyright © 2013. All Rights Reserved.