|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCertificateInfo
Contains information about a user's security certificates. This structure contains the certificates themselves as well as MD5 hashes whose significance is unknown at the time of this writing.
FullUserInfo.getCertInfoHash()
,
InfoData.getCertificateInfo()
Field Summary | |
static int |
CODE_DEFAULT
A default value for a "code" sent in certificate information blocks. |
static ByteBlock |
HASHA_DEFAULT
The value used by the official AIM clients for the first MD5 hash sent in certificate information blocks. |
static ByteBlock |
HASHB_DEFAULT
The value used by the official AIM clients for the second MD5 hash sent in certificate information blocks. |
Constructor Summary | |
CertificateInfo(ByteBlock commonCertData)
Creates a new certificate information object with the given certificate used for both signing and encrypting data, and MD5 hashes of HASHA_DEFAULT and HASHB_DEFAULT .
|
|
CertificateInfo(ByteBlock encCertData,
ByteBlock signCertData)
Creates a new certificate information object with the given encryption and signing certificates, and MD5 hashes of HASHA_DEFAULT and
HASHB_DEFAULT .
|
|
CertificateInfo(ByteBlock commonCertData,
ByteBlock hashA,
ByteBlock hashB)
Creates a new certificate information object with the given certificate used for both signing and encrypting data, and the given MD5 hashes. |
|
CertificateInfo(ByteBlock encCertData,
ByteBlock signCertData,
ByteBlock hashA,
ByteBlock hashB)
Creates a new certificate information object with the given encryption and signing certificates, and the given MD5 hashes. |
Method Summary | |
static byte[] |
getCertInfoHash(CertificateInfo certInfo)
Computes the MD5 hash of the given certificate information block. |
ByteBlock |
getCommonCertData()
Returns the "common certificate" stored in this certificate information block, if present. |
ByteBlock |
getEncCertData()
Returns the encryption certificate stored in this certificate information block, if present. |
ByteBlock |
getHashA()
Returns the first MD5 hash contained in this certificate information block, or null if none was sent. |
ByteBlock |
getHashB()
Returns the second MD5 hash contained in this certificate information block, or null if none was sent. |
ByteBlock |
getSignCertData()
Returns the signing certificate stored in this certificate information block, if present. |
boolean |
isCommon()
Returns whether this certificate information block contains a "common certificate," or a certificate used for both encrypting and signing. |
static CertificateInfo |
readCertInfoBlock(ByteBlock block)
Reads a certificate information block object from the given block of binary data. |
java.lang.String |
toString()
|
void |
write(java.io.OutputStream out)
Writes a representation of this object to the given stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int CODE_DEFAULT
public static final ByteBlock HASHA_DEFAULT
HASHB_DEFAULT
.
public static final ByteBlock HASHB_DEFAULT
HASHA_DEFAULT
.
Constructor Detail |
public CertificateInfo(ByteBlock commonCertData)
HASHA_DEFAULT
and HASHB_DEFAULT
.
commonCertData
can be null
to
indicate that no certificate should be sent.
commonCertData
- the certificate used to sign and encrypt datapublic CertificateInfo(ByteBlock commonCertData, ByteBlock hashA, ByteBlock hashB)
commonCertData
can be null
to
indicate that no certificate should be sent, as can either (or both) of
the hashes.
commonCertData
- the certificate used to sign and encrypt datahashA
- the first MD5 hashhashB
- the second MD5 hashpublic CertificateInfo(ByteBlock encCertData, ByteBlock signCertData)
HASHA_DEFAULT
and
HASHB_DEFAULT
.
encCertData
nor signCertData
can be null
.
encCertData
- the certificate used for encrypting datasignCertData
- the certificate used for signing datapublic CertificateInfo(ByteBlock encCertData, ByteBlock signCertData, ByteBlock hashA, ByteBlock hashB)
HASHA_DEFAULT
and
HASHB_DEFAULT
.
encCertData
nor signCertData
can be null
. Either or both of the hashes, however, can be
null
to indicate that they should not be sent.
encCertData
- the certificate used for encrypting datasignCertData
- the certificate used for signing datahashA
- the first MD5 hashhashB
- the second MD5 hashMethod Detail |
public static byte[] getCertInfoHash(CertificateInfo certInfo)
FullUserInfo.getCertInfoHash()
).
certInfo
- the certificate information block whose hash should be
computed
public static CertificateInfo readCertInfoBlock(ByteBlock block)
null
but will instead return an "empty" certificate information object if no
certificate information data is included in the given block of data.
block
- a block of data containing a user's certificate information
public final boolean isCommon()
true
, both getEncCertData()
and getSignCertData()
will be
null
; getCommonCertData()
will probably be
non-null
(although the common certificate being
non-null
cannot be guaranteed).
false
, getCommonCertData()
will be null
; in most cases, getEncCertData()
and
getSignCertData()
will be non-null
(although, once
again, the encryption and signing certificates being
non-null
cannot be guaranteed).
public final ByteBlock getCommonCertData()
null
if isCommon()
is false
, and it
may return null
even if isCommon()
is
true
, if no certificate was sent.
isCommon()
public final ByteBlock getEncCertData()
null
if isCommon()
is true
, and it
may return null
even if isCommon()
is
false
, if no encryption certificate was sent.
isCommon()
public final ByteBlock getSignCertData()
null
if isCommon()
is true
, and it
may return null
even if isCommon()
is
false
, if no signing certificate was sent.
isCommon()
public final ByteBlock getHashA()
null
if none was sent. At the time of this
writing, the significance of this value is unknown, as it seems to always
be HASHA_DEFAULT
.
public final ByteBlock getHashB()
null
if none was sent. At the time of this
writing, the significance of this value is unknown, as it seems to always
be HASHB_DEFAULT
.
public void write(java.io.OutputStream out) throws java.io.IOException
LiveWritable
write
in interface LiveWritable
out
- the stream to which to write
java.io.IOException
- if an I/O error occurspublic java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |