cryptix.pgp
Class EncryptedSecretKey
java.lang.Object
|
+--cryptix.util.Streamable
|
+--cryptix.pgp.EncryptedSecretKey
- All Implemented Interfaces:
- StreamInterface
- final class EncryptedSecretKey
- extends Streamable
An encrypted secret key class (used by SecretKeyCertificate).
Copyright © 1995-1997
Systemics Ltd on behalf of the
Cryptix Development Team.
All rights reserved.
$Revision: 1.4 $
- Since:
- Cryptix 2.2 or earlier
- Author:
- unattributed
Method Summary |
KeyID |
id()
Gets the key ID. |
boolean |
isEncrypted()
|
void |
read(java.io.DataInput in)
Reads 'this' from the DataInput object. |
SecretKey |
secretKey(StreamCipher cipher)
|
java.lang.String |
toString()
Returns a string representation of only the public parts of this secret
key, in hex. |
void |
write(java.io.DataOutput out)
Writes 'this' to the DataOutput object. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
EncryptedSecretKey
public EncryptedSecretKey(SecretKey sk,
Passphrase passphrase,
RandomStream rs)
throws java.io.IOException
EncryptedSecretKey
public EncryptedSecretKey(byte[] buf)
throws java.io.IOException
EncryptedSecretKey
public EncryptedSecretKey(java.io.DataInput in)
throws java.io.IOException
secretKey
public SecretKey secretKey(StreamCipher cipher)
throws DecryptException
read
public void read(java.io.DataInput in)
throws java.io.IOException
- Description copied from interface:
StreamInterface
- Reads 'this' from the DataInput object.
write
public void write(java.io.DataOutput out)
throws java.io.IOException
- Description copied from interface:
StreamInterface
- Writes 'this' to the DataOutput object.
id
public final KeyID id()
- Gets the key ID. This is needed to index secret key certificates
by ID.
- Returns:
- the lower 8 bytes of n, the public modulus.
toString
public java.lang.String toString()
- Returns a string representation of only the public parts of this secret
key, in hex.
- Overrides:
toString
in class java.lang.Object
isEncrypted
public boolean isEncrypted()