Package org.apache.james.jdkim.tagvalue
Class SignatureRecordImpl
- java.lang.Object
-
- org.apache.james.jdkim.tagvalue.TagValue
-
- org.apache.james.jdkim.tagvalue.SignatureRecordImpl
-
- All Implemented Interfaces:
SignatureRecord
public class SignatureRecordImpl extends TagValue implements SignatureRecord
-
-
Field Summary
-
Fields inherited from class org.apache.james.jdkim.tagvalue.TagValue
debug, defaults, mandatoryTags, VALIDATION
-
Fields inherited from interface org.apache.james.jdkim.api.SignatureRecord
ALL, ISCHEDULE_RELAXED, RELAXED, SIMPLE
-
-
Constructor Summary
Constructors Constructor Description SignatureRecordImpl(String data)
-
Method Summary
-
Methods inherited from class org.apache.james.jdkim.tagvalue.TagValue
containsTag, debugMsg, equals, getTags, getValue, hashCode, isInListCaseInsensitive, newTagValue, parse, setValue, stringToColonSeparatedList, tagSet, toString, trimFWS
-
-
-
-
Constructor Detail
-
SignatureRecordImpl
public SignatureRecordImpl(String data)
-
-
Method Detail
-
forIschedule
public static SignatureRecordImpl forIschedule(String data)
-
validate
public void validate() throws IllegalStateException- Specified by:
validatein interfaceSignatureRecord- Overrides:
validatein classTagValue- Throws:
IllegalStateException- See Also:
SignatureRecord.validate()
-
getHeaders
public List<CharSequence> getHeaders()
Description copied from interface:SignatureRecordReturn list of signed headers - that is the value of the "h" tag.- Specified by:
getHeadersin interfaceSignatureRecord- Returns:
- list of headers,
- See Also:
SignatureRecord.getHeaders()
-
getDefault
protected CharSequence getDefault(String tag)
- Overrides:
getDefaultin classTagValue
-
getIdentityLocalPart
public CharSequence getIdentityLocalPart()
- Specified by:
getIdentityLocalPartin interfaceSignatureRecord- See Also:
SignatureRecord.getIdentityLocalPart()
-
getIdentity
public CharSequence getIdentity()
This may throws IllegalArgumentException on invalid "i" content, but should always happen during validation!- Specified by:
getIdentityin interfaceSignatureRecord- See Also:
SignatureRecord.getIdentity()
-
getHttpVals
public String[] getHttpVals()
This may throws IllegalArgumentException on invalid "http" content, but should always happen during validation!- Returns:
- String[] [http-method, uri]
-
dkimQuotedPrintableDecode
public static String dkimQuotedPrintableDecode(CharSequence input) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
getHashKeyType
public CharSequence getHashKeyType()
- Specified by:
getHashKeyTypein interfaceSignatureRecord- See Also:
SignatureRecord.getHashKeyType()
-
getHashMethod
public CharSequence getHashMethod()
- Specified by:
getHashMethodin interfaceSignatureRecord- See Also:
SignatureRecord.getHashMethod()
-
getHashAlgo
public CharSequence getHashAlgo()
- Specified by:
getHashAlgoin interfaceSignatureRecord- See Also:
SignatureRecord.getHashAlgo()
-
getSelector
public CharSequence getSelector()
- Specified by:
getSelectorin interfaceSignatureRecord- See Also:
SignatureRecord.getSelector()
-
getDToken
public CharSequence getDToken()
- Specified by:
getDTokenin interfaceSignatureRecord- See Also:
SignatureRecord.getDToken()
-
getBodyHash
public byte[] getBodyHash()
- Specified by:
getBodyHashin interfaceSignatureRecord
-
getSignature
public byte[] getSignature()
- Specified by:
getSignaturein interfaceSignatureRecord
-
getBodyHashLimit
public int getBodyHashLimit()
- Specified by:
getBodyHashLimitin interfaceSignatureRecord
-
getSignatureTimestamp
public Long getSignatureTimestamp()
- Specified by:
getSignatureTimestampin interfaceSignatureRecord
-
getBodyCanonicalisationMethod
public String getBodyCanonicalisationMethod()
- Specified by:
getBodyCanonicalisationMethodin interfaceSignatureRecord
-
getHeaderCanonicalisationMethod
public String getHeaderCanonicalisationMethod()
- Specified by:
getHeaderCanonicalisationMethodin interfaceSignatureRecord
-
getRecordLookupMethods
public List<CharSequence> getRecordLookupMethods()
- Specified by:
getRecordLookupMethodsin interfaceSignatureRecord
-
setSignature
public void setSignature(byte[] newSignature)
- Specified by:
setSignaturein interfaceSignatureRecord
-
setBodyHash
public void setBodyHash(byte[] newBodyHash)
- Specified by:
setBodyHashin interfaceSignatureRecord
-
toUnsignedString
public String toUnsignedString()
- Specified by:
toUnsignedStringin interfaceSignatureRecord
-
-