All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cryptix.pgp.Armoury

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

public final class Armoury
extends Object
Note: Armoury is deprecated. New code should use ArmouredData in preference to this class.

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 $

Author:
unattributed
See Also:
ArmouredData

Variable Index

 o LINEFEED
The string (\r\n) PGP uses as a 'canonical' linefeed.

Method Index

 o decodeChecksum(String)
Decode the checksum contained in the String s.
 o message(PrintStream, Packet)
Armour and write the Packet pkt to out.
 o message(PrintStream, String, byte[])
Armour and write the packet of type name in the byte array buf to out.
 o message(String, byte[])
Armour and return the packet of type name in the byte array buf.
 o messageWithChecksum(byte[])
Armour and return the data in buf[] without the PGP framing lines.
 o name(Packet)
Returns the name PGP uses in its framing lines for this type of packet.
 o readUntilBegin(DataInputStream)
Read from the DataInputStream dis until a PGP section appears.
 o strip(String)
'Strips' armour off PGP binary data in the String buf and checks its 24-bit checksum.

Variables

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

Methods

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

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

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

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

Throws: IOException
if there was an I/O error
 o strip
 public static byte[] strip(String buf) throws FormatException, IOException, InvalidChecksumException
'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
Throws: IOException
if there was an I/O error
Throws: InvalidChecksumException
if the checksum was invalid
 o name
 public static String name(Packet pkt)
Returns the name PGP uses in its framing lines for this type of packet.

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

 o decodeChecksum
 public static int decodeChecksum(String s)
Decode the checksum contained in the String s.


All Packages  Class Hierarchy  This Package  Previous  Next  Index