Class Ssh2RsaPrivateCrtKey
java.lang.Object
com.sshtools.common.ssh.components.jce.Ssh2RsaPrivateCrtKey
- All Implemented Interfaces:
SshPrivateKey,SshRsaPrivateCrtKey,SshRsaPrivateKey
RSA co-efficient private key implementation for SSH2 protocol.
- Author:
- Lee David Painter
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSsh2RsaPrivateCrtKey(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient) -
Method Summary
Modifier and TypeMethodDescriptiondoPrivate(BigInteger input) booleaninthashCode()byte[]sign(byte[] data) Create a signature from the data.byte[]
-
Field Details
-
prv
-
-
Constructor Details
-
Ssh2RsaPrivateCrtKey
-
Ssh2RsaPrivateCrtKey
public Ssh2RsaPrivateCrtKey(BigInteger modulus, BigInteger publicExponent, BigInteger privateExponent, BigInteger primeP, BigInteger primeQ, BigInteger primeExponentP, BigInteger primeExponentQ, BigInteger crtCoefficient) throws NoSuchAlgorithmException, InvalidKeySpecException
-
-
Method Details
-
doPrivate
- Specified by:
doPrivatein interfaceSshRsaPrivateCrtKey- Throws:
SshException
-
getCrtCoefficient
- Specified by:
getCrtCoefficientin interfaceSshRsaPrivateCrtKey
-
getPrimeExponentP
- Specified by:
getPrimeExponentPin interfaceSshRsaPrivateCrtKey
-
getPrimeExponentQ
- Specified by:
getPrimeExponentQin interfaceSshRsaPrivateCrtKey
-
getPrimeP
- Specified by:
getPrimePin interfaceSshRsaPrivateCrtKey
-
getPrimeQ
- Specified by:
getPrimeQin interfaceSshRsaPrivateCrtKey
-
getPublicExponent
- Specified by:
getPublicExponentin interfaceSshRsaPrivateCrtKey
-
getModulus
- Specified by:
getModulusin interfaceSshRsaPrivateKey
-
getPrivateExponent
- Specified by:
getPrivateExponentin interfaceSshRsaPrivateKey
-
sign
Description copied from interface:SshPrivateKeyCreate a signature from the data.- Specified by:
signin interfaceSshPrivateKey- Specified by:
signin interfaceSshRsaPrivateKey- Returns:
- byte[]
- Throws:
IOException
-
sign
- Specified by:
signin interfaceSshPrivateKey- Throws:
IOException
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceSshPrivateKey
-
getJCEPrivateKey
- Specified by:
getJCEPrivateKeyin interfaceSshPrivateKey- Specified by:
getJCEPrivateKeyin interfaceSshRsaPrivateCrtKey
-
hashCode
public int hashCode() -
equals
-