wtanaka.praya.gale
Class EncryptedFragment
java.lang.Object
|
+--wtanaka.praya.gale.AbstractFragment
|
+--wtanaka.praya.gale.EncryptedFragment
- All Implemented Interfaces:
- FragmentInterface
- public class EncryptedFragment
- extends AbstractFragment
Represents an encrypted fragment.
Return to
or the Praya Homepage
- Version:
- $Name: $ $Date: 2001/09/30 21:14:52 $
- Author:
- $Author: wtanaka $
| Fields inherited from interface wtanaka.praya.gale.FragmentInterface |
BODY, CLASS, ENCRYPTED, INSTANCE, KEY_MEMBER, KEY_REDIRECT, NWO_KEY, NWO_KEY_REQUEST, NWO_RECEIPT, NWO_RECEIPT_REQ, OWO_KEY, OWO_KEY_REQUEST, OWO_RECEIPT, OWO_RECEIPT_REQ, PRESENCE, SENDER, SIGNATURE, TIME |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
MAX_ENCRYPTED_KEY_LEN
private static final int MAX_ENCRYPTED_KEY_LEN
m_iv
private byte[] m_iv
m_keys
private java.util.Hashtable m_keys
- Table mapping String (key name) into byte[] (key data)
m_encryptedData
private byte[] m_encryptedData
m_fragmentList
private FragmentList m_fragmentList
MAGIC_VER_1
private static final int MAGIC_VER_1
MAGIC_VER_2
private static final int MAGIC_VER_2
EncryptedFragment
public EncryptedFragment(java.lang.String fragmentName,
byte[] fragmentData)
throws java.io.IOException
EncryptedFragment
public EncryptedFragment(FragmentList listToEncrypt,
GalePublicKey[] publ)
- Convenience Constructor
EncryptedFragment
public EncryptedFragment(java.lang.String fragmentName,
FragmentList listToEncrypt,
GalePublicKey[] publ)
- Encrypts the given fragment list with the given private key.
getType
public FragmentType getType()
decryptFragmentList
public void decryptFragmentList()
getFragmentList
public FragmentList getFragmentList()
decrypt
private byte[] decrypt(byte[] ekey,
GalePrivateKey privateKey)
- Parameters:
ekey - encrypted key associated with key nameprivateKey - private key associated with key name
targetIDs
public java.util.Enumeration targetIDs()
getStreamLength
public int getStreamLength()
write
public void write(GaleOutputStream out)
throws java.io.IOException
- Writes this EncryptedFragment to the given output stream,
locking it with synchronized (out)
- Parameters:
out - the stream on which to write this.
toString
public java.lang.String toString(int indentLevel)
- Overrides:
toString in class AbstractFragment
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object