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
-
ArmouredMessage(String, KeyGlob, Passphrase)
- Decrypts and verifies an ASCII-armoured encrypted and/or signed message
plaintext() will return the decrypted message.
-
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.
-
authenticated()
-
-
byteEncode(String)
- These PGP classes work on byte arrays, not strings.
-
ciphertext()
-
-
encrypted()
-
-
plaintext()
-
-
signedBy()
-
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)
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.
ciphertext
public final String ciphertext()
- Returns:
- A string representing the ASCII-armoured encrypted text (including the -----BEGIN PGP wrapper)
plaintext
public final String plaintext()
- Returns:
- A string representing the decrypted text
signedBy
public final String signedBy()
- Returns:
- The name of the person who signed the message
authenticated
public final boolean authenticated()
- Returns:
- true if the decrypted message has a good signature
encrypted
public final boolean encrypted()
- Returns:
- true if the message was/is encrypted
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