Class SshRsaPrivateKey
- java.lang.Object
-
- com.sshtools.j2ssh.transport.publickey.SshPrivateKey
-
- com.sshtools.j2ssh.transport.publickey.rsa.SshRsaPrivateKey
-
public class SshRsaPrivateKey extends SshPrivateKey
- Version:
- $Revision: 1.19 $
- Author:
- $author$
-
-
Constructor Summary
Constructors Constructor Description SshRsaPrivateKey(byte[] encoded)
Creates a new SshRsaPrivateKey object.SshRsaPrivateKey(java.security.interfaces.RSAPrivateKey prv, java.security.interfaces.RSAPublicKey pub)
Creates a new SshRsaPrivateKey object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
byte[]
generateSignature(byte[] data)
java.lang.String
getAlgorithmName()
int
getBitLength()
byte[]
getEncoded()
SshPublicKey
getPublicKey()
int
hashCode()
-
-
-
Constructor Detail
-
SshRsaPrivateKey
public SshRsaPrivateKey(java.security.interfaces.RSAPrivateKey prv, java.security.interfaces.RSAPublicKey pub)
Creates a new SshRsaPrivateKey object.- Parameters:
prv
-pub
-
-
SshRsaPrivateKey
public SshRsaPrivateKey(byte[] encoded) throws InvalidSshKeyException
Creates a new SshRsaPrivateKey object.- Parameters:
encoded
-- Throws:
InvalidSshKeyException
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
-- Returns:
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
-
getAlgorithmName
public java.lang.String getAlgorithmName()
- Specified by:
getAlgorithmName
in classSshPrivateKey
- Returns:
-
getBitLength
public int getBitLength()
- Specified by:
getBitLength
in classSshPrivateKey
- Returns:
-
getEncoded
public byte[] getEncoded()
- Specified by:
getEncoded
in classSshPrivateKey
- Returns:
-
getPublicKey
public SshPublicKey getPublicKey()
- Specified by:
getPublicKey
in classSshPrivateKey
- Returns:
-
generateSignature
public byte[] generateSignature(byte[] data)
- Specified by:
generateSignature
in classSshPrivateKey
- Parameters:
data
-- Returns:
-
-