Methods Summary |
---|
public boolean | equals(java.lang.Object obj)Tests for equality between the specified object and this
code signer. Two code signers are considered equal if their
signer certificate paths are equal and if their timestamps are equal,
if present in both.
if (obj == null || (!(obj instanceof CodeSigner))) {
return false;
}
CodeSigner that = (CodeSigner)obj;
if (this == that) {
return true;
}
Timestamp thatTimestamp = that.getTimestamp();
if (timestamp == null) {
if (thatTimestamp != null) {
return false;
}
} else {
if (thatTimestamp == null ||
(! timestamp.equals(thatTimestamp))) {
return false;
}
}
return signerCertPath.equals(that.getSignerCertPath());
|
public java.security.cert.CertPath | getSignerCertPath()Returns the signer's certificate path.
return signerCertPath;
|
public java.security.Timestamp | getTimestamp()Returns the signature timestamp.
return timestamp;
|
public int | hashCode()Returns the hash code value for this code signer.
The hash code is generated using the signer's certificate path and the
timestamp, if present.
if (myhash == -1) {
if (timestamp == null) {
myhash = signerCertPath.hashCode();
} else {
myhash = signerCertPath.hashCode() + timestamp.hashCode();
}
}
return myhash;
|
public java.lang.String | toString()Returns a string describing this code signer.
StringBuffer sb = new StringBuffer();
sb.append("(");
sb.append("Signer: " + signerCertPath.getCertificates().get(0));
if (timestamp != null) {
sb.append("timestamp: " + timestamp);
}
sb.append(")");
return sb.toString();
|