|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cryptix.pgp.ArmouredMessage
Represents an ASCII-armoured PGP encrypted message.
Can encrypt a String, given public keys to encrypt to, and sign with the relevant secret key - but won't compress the data. That's for the next version.
Can also decrypt an armoured message.
Copyright © 1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.3 $
ArmouredData
Constructor Summary | |
ArmouredMessage(java.lang.String PGPmsg,
KeyGlob keyGlob,
Passphrase passphrase)
Deprecated. Decrypts and verifies an ASCII-armoured encrypted and/or signed message. |
|
ArmouredMessage(java.lang.String msg,
SecretKey sender,
java.util.Vector recipients)
Deprecated. Creates a new ASCII-armoured encrypted and signed message. |
Method Summary | |
boolean |
authenticated()
Deprecated. |
static byte[] |
byteEncode(java.lang.String text)
Deprecated. Use cryptix.mime.LegacyString.toByteArray(text) instead. |
java.lang.String |
ciphertext()
Deprecated. |
boolean |
encrypted()
Deprecated. |
java.lang.String |
plaintext()
Deprecated. |
java.lang.String |
signedBy()
Deprecated. |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public ArmouredMessage(java.lang.String msg, SecretKey sender, java.util.Vector recipients) throws java.io.IOException
If sender is null, the message will only be encrypted.
If recipients is empty, the message will be clearsigned.
The values returned by plaintext()
and
ciphertext()
will be set appropriately.
msg
- a string that you want to encryptsender
- the sender's PGP secret keyrecipients
- a Vector containing the public keys of the
message's recipient(s)java.io.IOException
- if there was an I/O errorpublic ArmouredMessage(java.lang.String PGPmsg, KeyGlob keyGlob, Passphrase passphrase) throws DecryptException, FormatException, java.io.IOException, InvalidChecksumException
plaintext()
will return the decrypted message.PGPmsg
- a string that you want to decrypt. It must
include the "-----BEGIN PGP" and "-----END PGP" wrapper.keyGlob
- a KeyGlob
containing keyrings and reference
to a keyserver where all the keys needed to decrypt or check this
message can be found.passphrase
- the user's passphraseDecryptException
- if the message could not be decryptedFormatException
- if the message was incorrectly formattedjava.io.IOException
- if there was an I/O errorInvalidChecksumException
- if the checksum was invalidMethod Detail |
public final java.lang.String ciphertext()
public final java.lang.String plaintext()
public final java.lang.String signedBy()
public final boolean authenticated()
true
if this message is signed correctly.public final boolean encrypted()
true
if the message was/is encryptedpublic static byte[] byteEncode(java.lang.String text)
cryptix.mime.LegacyString.toByteArray(text)
instead.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |