|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tranche.security.Signature
public class Signature
Abstracts the absolute minimum required for a signature. This is what the Signature interface should require, but the initial code had that funky 'getEncoding()' concept.
| Constructor Summary | |
|---|---|
Signature(byte[] bytes)
|
|
Signature(byte[] sig,
java.lang.String algorithm,
java.security.cert.X509Certificate cert)
|
|
Signature(java.io.InputStream in)
|
|
| Method Summary | |
|---|---|
void |
deserialize(java.io.InputStream in)
|
boolean |
equals(java.lang.Object o)
A custom equals() method for use by the hash algorithms. |
java.lang.String |
getAlgorithm()
|
byte[] |
getBytes()
|
java.security.cert.X509Certificate |
getCert()
|
java.lang.String |
getUserName()
|
int |
hashCode()
The custom hash code. |
void |
serialize(java.io.OutputStream out)
|
byte[] |
toByteArray()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Signature(byte[] sig,
java.lang.String algorithm,
java.security.cert.X509Certificate cert)
sig - the signature's bytes receivedalgorithm - the signature's algorithm receivedcert - the signature's certificate received
public Signature(java.io.InputStream in)
throws java.io.IOException,
java.security.GeneralSecurityException
in -
java.io.IOException
java.security.GeneralSecurityException
public Signature(byte[] bytes)
throws java.io.IOException,
java.security.GeneralSecurityException
bytes -
java.io.IOException
java.security.GeneralSecurityException| Method Detail |
|---|
public byte[] getBytes()
public java.lang.String getAlgorithm()
public java.security.cert.X509Certificate getCert()
public java.lang.String getUserName()
public byte[] toByteArray()
throws java.io.IOException,
java.security.cert.CertificateEncodingException
java.io.IOException
java.security.cert.CertificateEncodingException
public void serialize(java.io.OutputStream out)
throws java.io.IOException,
java.security.cert.CertificateEncodingException
out -
java.io.IOException
java.security.cert.CertificateEncodingException
public void deserialize(java.io.InputStream in)
throws java.io.IOException,
java.security.GeneralSecurityException
in -
java.io.IOException
java.security.GeneralSecurityExceptionpublic boolean equals(java.lang.Object o)
A custom equals() method for use by the hash algorithms.
equals in class java.lang.Objecto - The object compared to this signature object.
true if the object is equal to this signature object;
false otherwisepublic int hashCode()
The custom hash code.
hashCode in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||