Class cryptix.pgp.ArmouredMessage
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptix.pgp.ArmouredMessage

java.lang.Object
   |
   +----cryptix.pgp.ArmouredMessage

public final class ArmouredMessage
extends Object

Constructor Index

 o ArmouredMessage(String, KeyGlob, Passphrase)
Decrypts and verifies an ASCII-armoured encrypted and/or signed message plaintext() will return the decrypted message.

 o ArmouredMessage(String, SecretKey, Vector)
Creates a new ASCII-armoured encrypted and signed message.

If from is null, the message will only be encrypted.

If to is empty, the message will be clearsigned.

plaintext_ and ciphertext_ will be set appropriately.

Method Index

 o authenticated()
 o byteEncode(String)
These PGP classes work on byte arrays, not strings.
 o ciphertext()
 o encrypted()
 o plaintext()
 o signedBy()

Constructors

 o ArmouredMessage
  public ArmouredMessage(String msg,
                         SecretKey sender,
                         Vector recipients) throws IOException
Creates a new ASCII-armoured encrypted and signed message.

If from is null, the message will only be encrypted.

If to is empty, the message will be clearsigned.

plaintext_ and ciphertext_ will be set appropriately. Retrieve them using the plaintext() and ciphertext() functions.

Parameters:
msg - A string that you want to encrypt
from - Your PGP secret key
to - A Vector containing the public keys of the message's recipient(s)
 o ArmouredMessage
  public ArmouredMessage(String PGPmsg,
                         KeyGlob keyGlob,
                         Passphrase passphrase) throws DecryptException, FormatException, IOException, InvalidChecksumException
Decrypts and verifies an ASCII-armoured encrypted and/or signed message plaintext() will return the decrypted message.

Parameters:
PGPmsg - A string that you want to decrypt. It must include the -----BEGIN PGP and -----END PGP wrapper.

Methods

 o ciphertext
  public final String ciphertext()
Returns:
A string representing the ASCII-armoured encrypted text (including the -----BEGIN PGP wrapper)
 o plaintext
  public final String plaintext()
Returns:
A string representing the decrypted text
 o signedBy
  public final String signedBy()
Returns:
The name of the person who signed the message
 o authenticated
  public final boolean authenticated()
Returns:
true if the decrypted message has a good signature
 o encrypted
  public final boolean encrypted()
Returns:
true if the message was/is encrypted
 o byteEncode
  public static byte[] byteEncode(String text)
These PGP classes work on byte arrays, not strings. This function converts from one to the other.
Returns:
A byte array representing text

All Packages  Class Hierarchy  This Package  Previous  Next  Index