|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.upek.android.ptapi.rsa.RSAPublicKey
public class RSAPublicKey
This class represents a public RSA key, which can be imported and exported to TFM native representation. It implements java.security.interfaces.RSAPublicKey interface, so it can be used directly with RSA implementation from Java Cryptography Extension. Export and import from java.security.spec.RSAPublicKeySpec is supported too.
The native TFM representation is returned by getEncoded().
Constructor Summary | |
---|---|
RSAPublicKey(byte[] ptApiData)
Creates a new key from TFM internal format (returned by e.g. |
|
RSAPublicKey(java.security.interfaces.RSAPrivateCrtKey key)
Creates a new key from another class implementing RSAPrivateCrtKey (it is full RSA key specification which contains all private and public parts). |
|
RSAPublicKey(java.security.spec.RSAPrivateCrtKeySpec keySpec)
Creates a new key from RSAPrivateCrtKey key specifiction (it is full RSA key specification which contains all private and public parts). |
|
RSAPublicKey(java.security.interfaces.RSAPublicKey key)
Creates a new key from another class implementing RSAPublicKey. |
|
RSAPublicKey(java.security.spec.RSAPublicKeySpec keySpec)
Creates a new key from RSAPublicKeySpec 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.RSAPublicKeySpec |
getKeySpec()
Exports this key in a new RSAPublicKeySpec object. |
java.math.BigInteger |
getModulus()
|
java.math.BigInteger |
getPublicExponent()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RSAPublicKey(byte[] ptApiData) throws PtException
ptApiData
- contains key in native TFM RSA key representation
PtException
- whether buffer has invalid structurepublic RSAPublicKey(java.security.interfaces.RSAPrivateCrtKey key)
key
- is the source key to copypublic RSAPublicKey(java.security.spec.RSAPrivateCrtKeySpec keySpec)
keySpec
- is the source key specificationpublic RSAPublicKey(java.security.interfaces.RSAPublicKey key)
key
- is the source key to copypublic RSAPublicKey(java.security.spec.RSAPublicKeySpec 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.RSAPublicKeySpec getKeySpec()
public java.math.BigInteger getModulus()
getModulus
in interface java.security.interfaces.RSAKey
public java.math.BigInteger getPublicExponent()
getPublicExponent
in interface java.security.interfaces.RSAPublicKey
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |