|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.logi.crypto.Crypto | +--org.logi.crypto.keys.KeyRecord
This class holds a particular key, linking it to the owner's name and e-mail and annotation.
The CDS for a KeyRecord object is KeyRecord(key,ownerName,ownerMail,notes)
where key
is a CDF for a Key
object and
the other parameters are strings, which may be quoted.
Note that the key-certificate system is incomplete and is very likely to change drastically.
Key
,
KeySource
Fields inherited from class org.logi.crypto.Crypto |
BIT, cdsPath, EMPTY_ARRAY, FOUR, keySource, NIBBLE, ONE, primeCertainty, random, TWO, ZERO |
Constructor Summary | |
KeyRecord(Key key,
java.lang.String ownerName,
java.lang.String ownerMail,
java.lang.String notes)
Create a new KeyRecord. |
Method Summary | |
Fingerprint |
getFingerprint()
Return the SHA1 fingerprint of this KeyRecord. |
Key |
getKey()
Return the key from this record. |
java.lang.String |
getNotes()
Return the notes about this key. |
java.lang.String |
getOwnerMail()
Return the e-mail address of the key's owner. |
java.lang.String |
getOwnerName()
Return the name of the key's owner. |
static KeyRecord |
parseCDS(java.lang.String[] param)
Used by Crypto.fromString when parsing a CDS. |
void |
prettyPrint(java.io.PrintWriter out,
int ind,
int rec)
Print this object to out, indented with ind tabs, going down at most rec levels of recursion. |
java.lang.String |
toString()
Return a CDS for this KeyRecord. |
Methods inherited from class org.logi.crypto.Crypto |
binString, binString, ensureArrayLength, ensureArrayLength, equal, equalRelaxed, equalSub, fromHexNibble, fromHexString, fromString, fromString, hexString, hexString, hexString, hexString, hexString, initRandom, initRandom, makeClass, makeInt, makeLong, makeSessionKey, pastSpace, pickBits, pickBits, prettyPrint, readBlock, readInt, trimArrayLength, trimArrayLength, trimLeadingZeroes, writeBytes, writeBytes, writeInt |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public KeyRecord(Key key, java.lang.String ownerName, java.lang.String ownerMail, java.lang.String notes)
key
which supposedly
belongs to ownerName
who has e-mail adress
ownerMail
. Additional notes are taken from
notes
.Method Detail |
public static KeyRecord parseCDS(java.lang.String[] param) throws InvalidCDSException
A valid CDS can be created by calling the toString() method.
InvalidCDSException
- if the CDS is malformed.Crypto.fromString(String)
public Key getKey()
public java.lang.String getOwnerName()
public java.lang.String getOwnerMail()
public java.lang.String getNotes()
public Fingerprint getFingerprint()
public java.lang.String toString()
toString
in class java.lang.Object
public void prettyPrint(java.io.PrintWriter out, int ind, int rec) throws java.io.IOException
prettyPrint
in class Crypto
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |