|
Cryptix OpenPGP | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcryptix.message.Message
cryptix.message.EncryptedMessage
Represents an encrypted message.
Constructor Summary | |
EncryptedMessage(java.lang.String format)
Creates a EncryptedMessage of the specified format. |
Method Summary | |
abstract Message |
decrypt(char[] passphrase)
Decrypt the message with a passphrase. |
abstract Message |
decrypt(java.security.Key key)
Decrypt the message with a key. |
abstract Message |
decrypt(KeyBundle bundle,
char[] passphrase)
Decrypt the message with a keybundle, decrypting the private key in the keybundle using the given passphrase. |
abstract KeyID[] |
getKeyIDHints()
Returns hints for which keys can be used to decrypt this message |
Methods inherited from class cryptix.message.Message |
equals, getAttribute, getEncoded, getFormat, hashCode |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EncryptedMessage(java.lang.String format)
Method Detail |
public abstract Message decrypt(java.security.Key key) throws NotEncryptedToParameterException, MessageException, java.lang.UnsupportedOperationException
For most formats this key will usually be an instance of PrivateKey (i.e. public key encryption was used). However, for some formats it could also be possible to pass in a SecretKey (i.e. symmetric key encryption was used).
NotEncryptedToParameterException
- if the decryption failed because
this message is not encrypted to that particular key.
MessageException
- on a variety of format specific problems.
java.lang.UnsupportedOperationException
- if this particular format does not
support key based encryption.public abstract Message decrypt(KeyBundle bundle, char[] passphrase) throws NotEncryptedToParameterException, MessageException, java.lang.UnsupportedOperationException, java.security.UnrecoverableKeyException
NotEncryptedToParameterException
- if the decryption failed because
this message is not encrypted to that particular key.
MessageException
- on a variety of format specific problems.
java.lang.UnsupportedOperationException
- if this particular format does not
support key based encryption.
java.security.UnrecoverableKeyException
- if the private key cannot be retrieved
from the keybundle (for example because of an incorrect
passphrase).public abstract Message decrypt(char[] passphrase) throws NotEncryptedToParameterException, MessageException, java.lang.UnsupportedOperationException
NotEncryptedToParameterException
- if the decryption failed because
this message is not encrypted to that particular passphrase.
MessageException
- on a variety of format specific problems.
java.lang.UnsupportedOperationException
- if this particular format does not
support password based encryption.public abstract KeyID[] getKeyIDHints() throws MessageException
MessageException
- on a variety of format specific problems.
|
Cryptix OpenPGP | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |