cryptix.pgp
Class PublicKeyEncrypted

java.lang.Object
  |
  +--cryptix.pgp.Packet
        |
        +--cryptix.pgp.PublicKeyEncrypted

public final class PublicKeyEncrypted
extends Packet

DOCUMENT ME.


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

$Revision: 1.1.1.1 $

Since:
Cryptix 2.2 or earlier
Author:
original author not stated

Fields inherited from class cryptix.pgp.Packet
COMMENT, COMPRESSED, CONV_ENCRYPTED, MESSAGE_DIGEST, PLAINTEXT, PUBLIC_KEY, PUBLIC_KEY_ENCRYPTED, SECRET_KEY, SIGNATURE, TRUST, USER_ID
 
Constructor Summary
PublicKeyEncrypted(java.io.DataInput in, int length)
           
PublicKeyEncrypted(PublicKey publicKey, byte[] ideaKey, RandomStream rand)
           
 
Method Summary
 BigInteger getEncryptionKey()
           
 byte[] getKey(SecretKey key)
           
 int getType()
           
 void read(java.io.DataInput in, int length)
           
 KeyID secretKeyID()
          Returns the ID of the secret key needed to decrypt this packet.
 java.lang.String toString()
           
 int write(java.io.DataOutput out)
           
 
Methods inherited from class cryptix.pgp.Packet
ctbToLengthSpecifier, ctbToType, getDefaultLengthSpecifier, isCTB, isLegalPacketType, load, load, load, makeCTB, save
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PublicKeyEncrypted

public PublicKeyEncrypted(PublicKey publicKey,
                          byte[] ideaKey,
                          RandomStream rand)

PublicKeyEncrypted

public PublicKeyEncrypted(java.io.DataInput in,
                          int length)
                   throws java.io.IOException
Method Detail

read

public void read(java.io.DataInput in,
                 int length)
          throws java.io.IOException
Overrides:
read in class Packet

write

public int write(java.io.DataOutput out)
          throws java.io.IOException
Overrides:
write in class Packet

secretKeyID

public KeyID secretKeyID()
Returns the ID of the secret key needed to decrypt this packet. Can be used with SecretKeyRing.getKey(KeyID keyID, Passphrase passphrase).

getEncryptionKey

public BigInteger getEncryptionKey()

getKey

public byte[] getKey(SecretKey key)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getType

public int getType()
Overrides:
getType in class Packet