|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbadpenguin.dkim.Canonicaliser
public class Canonicaliser
The Canonicaliser class is responsible for preparing a message for signing or verification. It understands the DKIM canonical methods simple and relaxed, as well as the DomainKey methods simple and nofws.
| Constructor Summary | |
|---|---|
Canonicaliser()
Create a new canonicaliser instance. |
|
Canonicaliser(java.lang.String sigPref)
Create a new canonicaliser instance, which will prefer to use the Signature type specified in sigPref (either "DomainKey" or "DKIM"). |
|
| Method Summary | |
|---|---|
java.util.Stack<java.lang.String> |
getDkimHeaders()
If the Canonicaliser was initialised for verification with initVerify(headerStream), then all DKIM signatures will be available in a Stack. |
java.util.Stack<java.lang.String> |
getDomKeyHeaders()
If the Canonicaliser was initialised for verification with initVerify(headerStream), then all DomainKey signatures will be available in a Stack. |
java.lang.String |
getRecommendedHeaders()
Return a colon separated list of headers, which were found in this message, and are recommended for signing by the DKIM RFC. |
void |
initSign(java.io.ByteArrayOutputStream headerStream)
Initialise this canonicaliser for use in signing. |
void |
initVerify(java.io.ByteArrayOutputStream headerStream)
Initialise this Canonicaliser for Verification. |
java.lang.String |
initVerify(java.io.ByteArrayOutputStream headerStream,
boolean fallback)
Initialise this Canonicaliser for Verification. |
java.lang.String |
processBody(java.io.ByteArrayOutputStream bodyStream,
long length,
CanonicalMethod method)
Read the body from the given byte stream and process it with the specified canonicalisation method. |
java.lang.String |
processHeaders(DkimSignature dkimSig)
Process the headers provided during initialisation. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Canonicaliser(java.lang.String sigPref)
sigPref - - Signature preference, DKIM or DomainKeypublic Canonicaliser()
| Method Detail |
|---|
public java.lang.String getRecommendedHeaders()
throws DkimException
DkimException
public java.lang.String processBody(java.io.ByteArrayOutputStream bodyStream,
long length,
CanonicalMethod method)
throws DkimException
bodyStream - - The body data to be processedlength - - The length at which to truncate the body, or -1method - - The CanonicalMethod to use
DkimException
public java.lang.String processHeaders(DkimSignature dkimSig)
throws DkimException
dkimSig - - The DkimSignature object which relates to these headers
DkimException
public java.lang.String initVerify(java.io.ByteArrayOutputStream headerStream,
boolean fallback)
throws DkimException
headerStream - - The message headers to be readfallback - - Should we fall back to the other DomainKey header?
DkimException
public void initVerify(java.io.ByteArrayOutputStream headerStream)
throws DkimException
headerStream -
DkimException
public void initSign(java.io.ByteArrayOutputStream headerStream)
throws DkimException
headerStream - - The message headers to be read.
DkimException
public java.util.Stack<java.lang.String> getDkimHeaders()
throws DkimException
DkimException
public java.util.Stack<java.lang.String> getDomKeyHeaders()
throws DkimException
DkimException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||