|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.upek.android.ptapi.rsa.RSAPrivateCrtKey
public class RSAPrivateCrtKey
This class represents a private RSA key with full information, which can be imported and exported to TFM native representation. It implements java.security.interfaces.RSAPrivateCrtKey interface, so it can be used directly with RSA implementation from Java Cryptography Extension. Export and import from java.security.spec.RSAPrivateCrtKeySpec is supported too.
The native TFM representation is returned by getEncoded().
Constructor Summary | |
---|---|
RSAPrivateCrtKey(byte[] ptApiData)
Creates a new key from TFM internal format. |
|
RSAPrivateCrtKey(java.security.interfaces.RSAPrivateCrtKey key)
Creates a new key from another class implementing RSAPrivateCrtKey. |
|
RSAPrivateCrtKey(java.security.spec.RSAPrivateCrtKeySpec keySpec)
Creates a new key from RSAPrivateCrtKeySpec key specifiction. |
Method Summary | |
---|---|
java.lang.String |
getAlgorithm()
|
int |
getBitLegth()
Returns a bit length of this key. |
java.math.BigInteger |
getCrtCoefficient()
|
byte[] |
getEncoded()
|
java.lang.String |
getFormat()
|
java.security.spec.RSAPrivateCrtKeySpec |
getKeySpec()
Exports this key in a new RSAPrivateCrtKeySpec object. |
java.math.BigInteger |
getModulus()
|
java.math.BigInteger |
getPrimeExponentP()
|
java.math.BigInteger |
getPrimeExponentQ()
|
java.math.BigInteger |
getPrimeP()
|
java.math.BigInteger |
getPrimeQ()
|
java.math.BigInteger |
getPrivateExponent()
|
java.math.BigInteger |
getPublicExponent()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RSAPrivateCrtKey(byte[] ptApiData) throws PtException
ptApiData
- contains key in native TFM RSA key representation
PtException
- whether buffer has invalid structurepublic RSAPrivateCrtKey(java.security.interfaces.RSAPrivateCrtKey key)
key
- is the source key to copypublic RSAPrivateCrtKey(java.security.spec.RSAPrivateCrtKeySpec keySpec)
keySpec
- is the source key specificationMethod Detail |
---|
public java.lang.String getAlgorithm()
getAlgorithm
in interface java.security.Key
public int getBitLegth()
public java.math.BigInteger getCrtCoefficient()
getCrtCoefficient
in interface java.security.interfaces.RSAPrivateCrtKey
public byte[] getEncoded()
getEncoded
in interface java.security.Key
public java.lang.String getFormat()
getFormat
in interface java.security.Key
public java.security.spec.RSAPrivateCrtKeySpec getKeySpec()
public java.math.BigInteger getModulus()
getModulus
in interface java.security.interfaces.RSAKey
public java.math.BigInteger getPrimeExponentP()
getPrimeExponentP
in interface java.security.interfaces.RSAPrivateCrtKey
public java.math.BigInteger getPrimeExponentQ()
getPrimeExponentQ
in interface java.security.interfaces.RSAPrivateCrtKey
public java.math.BigInteger getPrimeP()
getPrimeP
in interface java.security.interfaces.RSAPrivateCrtKey
public java.math.BigInteger getPrimeQ()
getPrimeQ
in interface java.security.interfaces.RSAPrivateCrtKey
public java.math.BigInteger getPrivateExponent()
getPrivateExponent
in interface java.security.interfaces.RSAPrivateKey
public java.math.BigInteger getPublicExponent()
getPublicExponent
in interface java.security.interfaces.RSAPrivateCrtKey
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |