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