public final class DomainKey extends Object
DomainKey holds the information about a domain key.| Constructor and Description |
|---|
DomainKey(Map<Character,String> tags)
Creates a new
DomainKey from the given tags. |
| Modifier and Type | Method and Description |
|---|---|
void |
check(String identity,
RSAPrivateKey privateKey)
Checks, whether this
DomainKey fits to the given identity and
RSAPrivateKey. |
Pattern |
getGranularity()
Returns a
Pattern that matches the granularity of this
DomainKey, as described in the 'g' tag. |
RSAPublicKey |
getPublicKey()
Returns the set of public key of this
DomainKey, as provided by
the 'p' tag. |
Set<String> |
getServiceTypes()
Returns the set of service types supported by this
DomainKey, as
described in the 's' tag. |
Map<Character,String> |
getTags()
Returns the
unmodifiable map of
tags, this DomainKey was constructed from. |
long |
getTimestamp()
Returns the construction time of this
DomainKey as a timestamp. |
String |
toString() |
public DomainKey(Map<Character,String> tags) throws DkimException
DomainKey from the given tags.tags - The tags to be used.DkimException - If either the version, key type or service type given in the
tags is incompatible to this library ('DKIM1', 'RSA' and
'email' respectively).public long getTimestamp()
DomainKey as a timestamp.DomainKey as a timestamp.public Pattern getGranularity()
Pattern that matches the granularity of this
DomainKey, as described in the 'g' tag.Pattern that matches the granularity of this
DomainKey.public Set<String> getServiceTypes()
DomainKey, as
described in the 's' tag.DomainKey.public RSAPublicKey getPublicKey()
DomainKey, as provided by
the 'p' tag.DomainKey.public Map<Character,String> getTags()
unmodifiable map of
tags, this DomainKey was constructed from.DomainKey was constructed from.public void check(String identity, RSAPrivateKey privateKey) throws DkimSigningException
DomainKey fits to the given identity and
RSAPrivateKey.identity - The identity.privateKey - The RSAPrivateKey.DkimSigningException - If either the granularity
of this DomainKey doesn't match the given identity or
the public key of this
DomainKey doesn't belong to the given
RSAPrivateKey.Copyright © 2015–2018 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.