cryptix.pgp
Class ArmouredData

java.lang.Object
  extended bycryptix.pgp.ArmouredData

public final class ArmouredData
extends java.lang.Object

This class represents an ASCII-Armoured message.

Although this class can also represent a clearsigned message, it is not the job of this class either to sign, or to verify the signature - that is the job of the Signature class. Thus, using the ArmouredData class alone, it is perfectly possible to create a clearsigned message with a bad signature!

It is also not the job of this class to deal with character set conversions or canonical form. The classes in the package cryptix.pgp.charset can do that job much better.


Copyright © 1995-1997 Systemics Ltd on behalf of the Cryptix Development Team.
All rights reserved.

$Revision: 1.3 $

Since:
Cryptix 2.2 or earlier
Author:
Jill Baker, Ian Brown, Gary Howland
See Also:
Signature, cryptix.pgp.app.ArmourDecryptor

Field Summary
protected static QuotedPrintable quotedPrintable
           
 
Constructor Summary
ArmouredData(byte[] armouredBytes)
           
ArmouredData(byte[] text, PacketByteArray signature)
           
ArmouredData(PacketByteArray payload)
           
ArmouredData(java.util.Properties properties, byte[] clearText, PacketByteArray signature)
           
ArmouredData(java.util.Properties properties, PacketByteArray payload)
           
ArmouredData(java.lang.String armouredText)
          The following constructors accept text that is already armoured.
 
Method Summary
static java.lang.String armour(PacketByteArray pba)
           
 byte[] getClearText()
           
 PacketByteArray getPayload()
           
 java.util.Properties getProperties()
           
 void parse(java.lang.String armouredMessage)
          Unarmour an armoured message.
 java.lang.String toString()
          Armour an unarmoured message.
static PacketByteArray unarmour(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

quotedPrintable

protected static QuotedPrintable quotedPrintable
Constructor Detail

ArmouredData

public ArmouredData(PacketByteArray payload)

ArmouredData

public ArmouredData(java.util.Properties properties,
                    PacketByteArray payload)

ArmouredData

public ArmouredData(byte[] text,
                    PacketByteArray signature)
             throws FormatException

ArmouredData

public ArmouredData(java.util.Properties properties,
                    byte[] clearText,
                    PacketByteArray signature)
             throws FormatException

ArmouredData

public ArmouredData(java.lang.String armouredText)
             throws FormatException
The following constructors accept text that is already armoured.

See Also:
parse(String), toString()

ArmouredData

public ArmouredData(byte[] armouredBytes)
             throws FormatException
Method Detail

getProperties

public java.util.Properties getProperties()

getClearText

public byte[] getClearText()

getPayload

public PacketByteArray getPayload()

armour

public static java.lang.String armour(PacketByteArray pba)

unarmour

public static PacketByteArray unarmour(java.lang.String s)
                                throws FormatException
Throws:
FormatException

parse

public void parse(java.lang.String armouredMessage)
           throws FormatException
Unarmour an armoured message.

Throws:
FormatException

toString

public java.lang.String toString()
Armour an unarmoured message.