cryptix.pgp
Class Armoury

java.lang.Object
  extended bycryptix.pgp.Armoury

Deprecated. New code should use ArmouredData in preference to this class.

public final class Armoury
extends java.lang.Object

Static methods to convert data to and from the 64-bit encoding, with a 24-bit checksum, that PGP uses as 'transport armour'.

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

$Revision: 1.2 $

Since:
2.2
Author:
unattributed
See Also:
ArmouredData

Field Summary
static java.lang.String LINEFEED
          Deprecated. The string (\r\n) PGP uses as a 'canonical' linefeed.
 
Method Summary
static int decodeChecksum(java.lang.String s)
          Deprecated. Decode the checksum contained in the String s.
static void message(java.io.PrintStream out, Packet pkt)
          Deprecated. Armour and write the Packet pkt to out.
static void message(java.io.PrintStream out, java.lang.String name, byte[] buf)
          Deprecated. Armour and write the packet of type name in the byte array buf to out.
static java.lang.String message(java.lang.String name, byte[] buf)
          Deprecated. Armour and return the packet of type name in the byte array buf.
static java.lang.String messageWithChecksum(byte[] buf)
          Deprecated. Armour and return the data in buf[] without the PGP framing lines.
static java.lang.String name(Packet pkt)
          Deprecated. Returns the name PGP uses in its framing lines for this type of packet.
static void readUntilBegin(java.io.DataInputStream dis)
          Deprecated. Read from the DataInputStream dis until a PGP section appears.
static byte[] strip(java.lang.String buf)
          Deprecated. 'Strips' armour off PGP binary data in the String buf and checks its 24-bit checksum.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LINEFEED

public static final java.lang.String LINEFEED
Deprecated. 
The string (\r\n) PGP uses as a 'canonical' linefeed.

See Also:
Constant Field Values
Method Detail

messageWithChecksum

public static java.lang.String messageWithChecksum(byte[] buf)
Deprecated. 
Armour and return the data in buf[] without the PGP framing lines.


message

public static void message(java.io.PrintStream out,
                           java.lang.String name,
                           byte[] buf)
Deprecated. 
Armour and write the packet of type name in the byte array buf to out.


message

public static java.lang.String message(java.lang.String name,
                                       byte[] buf)
Deprecated. 
Armour and return the packet of type name in the byte array buf.


message

public static void message(java.io.PrintStream out,
                           Packet pkt)
                    throws java.io.IOException
Deprecated. 
Armour and write the Packet pkt to out.

Throws:
java.io.IOException - if there was an I/O error

strip

public static byte[] strip(java.lang.String buf)
                    throws FormatException,
                           java.io.IOException,
                           InvalidChecksumException
Deprecated. 
'Strips' armour off PGP binary data in the String buf and checks its 24-bit checksum.

Returns:
the decoded data as a byte array.
Throws:
FormatException - if the message was incorrectly formatted
java.io.IOException - if there was an I/O error
InvalidChecksumException - if the checksum was invalid

name

public static java.lang.String name(Packet pkt)
Deprecated. 
Returns the name PGP uses in its framing lines for this type of packet.


readUntilBegin

public static void readUntilBegin(java.io.DataInputStream dis)
                           throws java.io.IOException
Deprecated. 
Read from the DataInputStream dis until a PGP section appears.

Throws:
java.io.IOException

decodeChecksum

public static int decodeChecksum(java.lang.String s)
Deprecated. 
Decode the checksum contained in the String s.