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
-
LINEFEED
- The string (\r\n) PGP uses as a 'canonical' linefeed.
-
decodeChecksum(String)
- Decode the checksum contained in the String s.
-
message(PrintStream, Packet)
- Armour and write the Packet pkt to out.
-
message(PrintStream, String, byte[])
- Armour and write the packet of type name in the byte array
buf to out.
-
message(String, byte[])
- Armour and return the packet of type name in the byte array
buf.
-
messageWithChecksum(byte[])
- Armour and return the data in buf[]
without the PGP framing lines.
-
name(Packet)
- Returns the name PGP uses in its framing lines for this type
of packet.
-
readUntilBegin(DataInputStream)
- Read from the DataInputStream dis until a PGP section appears.
-
strip(String)
- 'Strips' armour off PGP binary data in the String buf
and checks its 24-bit checksum.
LINEFEED
public static final String LINEFEED
- The string (\r\n) PGP uses as a 'canonical' linefeed.
messageWithChecksum
public static String messageWithChecksum(byte buf[])
- Armour and return the data in buf[]
without the PGP framing lines.
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.
message
public static String message(String name,
byte buf[])
- Armour and return the packet of type name in the byte array
buf.
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
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
name
public static String name(Packet pkt)
- Returns the name PGP uses in its framing lines for this type
of packet.
readUntilBegin
public static void readUntilBegin(DataInputStream dis) throws IOException
- Read from the DataInputStream dis until a PGP section appears.
decodeChecksum
public static int decodeChecksum(String s)
- Decode the checksum contained in the String s.
All Packages Class Hierarchy This Package Previous Next Index