public class RSAPrivateKey extends java.lang.Object implements IPrivateKey
Constructor and Description |
---|
RSAPrivateKey(byte[] privateKey)
Creates a new RSAPrivateKey, which can be used for decryption of messages and creation of signatures with the given private key.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
createSignature(byte[] message)
Creates a cryptographic signature (with this private key) of a message.
|
byte[] |
decryptMessage(byte[] message)
Decrypts an encrypted message (with this private key).
|
boolean |
equals(java.lang.Object obj)
Every private key has to implement a comparison operator.
|
public RSAPrivateKey(byte[] privateKey) throws java.io.IOException
privateKeyParam
- The private key which should be used for decryption of messages and the creation of signaturesjava.io.IOException
public byte[] createSignature(byte[] message)
IPrivateKey
createSignature
in interface IPrivateKey
message
- The message which should be signedpublic byte[] decryptMessage(byte[] message)
IPrivateKey
decryptMessage
in interface IPrivateKey
message
- The encrypted message, which should be decryptedpublic boolean equals(java.lang.Object obj)
IPrivateKey
equals
in interface IPrivateKey
equals
in class java.lang.Object
obj
- The object of the type AbstractCertificate
that should be compared to the current private keyObject.equals(java.lang.Object)