com.maverick.ssh.components.jce
Class Ssh2RsaPrivateKey

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

public class Ssh2RsaPrivateKey
extends java.lang.Object
implements SshRsaPrivateKey

RSA private key implementation for the SSH2 protocol.

Author:
Lee David Painter

Field Summary
protected  java.security.interfaces.RSAPrivateKey prv
           
 
Constructor Summary
Ssh2RsaPrivateKey(java.math.BigInteger modulus, java.math.BigInteger privateExponent)
           
Ssh2RsaPrivateKey(java.security.interfaces.RSAPrivateKey prv)
           
 
Method Summary
 java.lang.String getAlgorithm()
           
 java.math.BigInteger getModulus()
           
 java.math.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 java.security.interfaces.RSAPrivateKey prv
Constructor Detail

Ssh2RsaPrivateKey

public Ssh2RsaPrivateKey(java.security.interfaces.RSAPrivateKey prv)

Ssh2RsaPrivateKey

public Ssh2RsaPrivateKey(java.math.BigInteger modulus,
                         java.math.BigInteger privateExponent)
                  throws java.security.NoSuchAlgorithmException,
                         java.security.spec.InvalidKeySpecException
Method Detail

sign

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

Specified by:
sign in interface SshRsaPrivateKey
Throws:
java.io.IOException

getAlgorithm

public java.lang.String getAlgorithm()
Specified by:
getAlgorithm in interface SshPrivateKey

getModulus

public java.math.BigInteger getModulus()
Specified by:
getModulus in interface SshRsaPrivateKey

getPrivateExponent

public java.math.BigInteger getPrivateExponent()
Specified by:
getPrivateExponent in interface SshRsaPrivateKey


Copyright © 2003-2008 SSHTools LTD. All Rights Reserved.