de.flexiprovider.core.rsa
Class RSAPrivateKey
java.lang.Object
|
+--de.flexiprovider.api.keys.PrivateKey
|
+--de.flexiprovider.core.rsa.interfaces.RSAPrivateKey
|
+--de.flexiprovider.core.rsa.RSAPrivateKey
- All Implemented Interfaces:
- Key, java.security.Key, java.security.PrivateKey, RSAKey, java.security.interfaces.RSAKey, java.security.interfaces.RSAPrivateKey, java.io.Serializable
- public class RSAPrivateKey
- extends RSAPrivateKey
This class implements the RSAPrivateKey interface. It represents a
RSA private key and is usually instantiated from RSAKeyPairGenerator.
- Author:
- Thomas Wahrenbruch, Ralf-Philipp Weinmann
- See Also:
RSAKeyPairGenerator, Serialized Form
| Fields inherited from interface java.security.PrivateKey |
serialVersionUID |
| Methods inherited from class java.lang.Object |
, clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.security.Key |
getEncoded, getFormat |
RSAPrivateKey
protected RSAPrivateKey(FlexiBigInt n,
FlexiBigInt d)
- Construct a new private RSA key.
- Parameters:
n - -
the modulus n = p*qd - -
the private exponent d- See Also:
RSAKeyPairGenerator
RSAPrivateKey
protected RSAPrivateKey(RSAPrivateKeySpec keySpec)
- Construct an RSAPrivKey out of the given key specification.
- Parameters:
keySpec - the key specification
getN
public FlexiBigInt getN()
- Returns:
- the modulus n
getD
public FlexiBigInt getD()
- Overrides:
getD in class RSAPrivateKey
- Returns:
- the private exponent d
equals
public boolean equals(java.lang.Object other)
- Compare this key with another object
- Overrides:
equals in class java.lang.Object
- Parameters:
other - the other object- Returns:
- the result of the comparison
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
- Returns:
- a human readable form of the key
getOID
protected codec.asn1.ASN1ObjectIdentifier getOID()
- Overrides:
getOID in class PrivateKey
- Returns:
- the OID to encode in the SubjectPublicKeyInfo structure
getAlgParams
protected codec.asn1.ASN1Type getAlgParams()
- Overrides:
getAlgParams in class PrivateKey
- Returns:
- the algorithm parameters to encode in the SubjectPublicKeyInfo
structure
getKeyData
protected byte[] getKeyData()
- Overrides:
getKeyData in class PrivateKey
- Returns:
- the keyData to encode in the SubjectPublicKeyInfo structure