io.vertx.ext.mail

## Class DKIMSignOptions

- java.lang.Object
- - io.vertx.ext.mail.DKIMSignOptions

-     public class DKIMSignOptions
      extends Object

  This represents the options used to perform DKIM Signature signing action. See: https://tools.ietf.org/html/rfc6376
  Author:
    Lin Gao

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DKIMSignOptions()` Default Constructor.
    `DKIMSignOptions(DKIMSignOptions other)`
    `DKIMSignOptions(JsonObject config)` Constructor from a JsonObject.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DKIMSignOptions` | `addCopiedHeader(String header)` Adds a copied header.
    `DKIMSignOptions` | `addSignedHeader(String header)` Adds the signed header
    `boolean` | `equals(Object o)`
    `String` | `getAuid()` Gets the Agent or User Identifier(AUID)
    `CanonicalizationAlgorithm` | `getBodyCanonAlgo()` Gets the canonicalization algorithm for mail body.
    `int` | `getBodyLimit()` Gets the body limit to sign.
    `List<String>` | `getCopiedHeaders()` Gets the copied headers used in DKIM.
    `long` | `getExpireTime()` Gets the expire time in seconds when the signature sign will be expired.
    `CanonicalizationAlgorithm` | `getHeaderCanonAlgo()` Gets the canonicalization algorithm for signed headers.
    `String` | `getPrivateKey()` Gets the PKCS#8 format private key used to sign the email.
    `String` | `getPrivateKeyPath()` Gets the PKCS#8 format private key file path.
    `String` | `getSdid()` Gets the Singing Domain Identifier(SDID).
    `String` | `getSelector()` Gets the selector used to query public key.
    `DKIMSignAlgorithm` | `getSignAlgo()` Gets the signing algorithm.
    `List<String>` | `getSignedHeaders()` Gets the email signedHeaders used to sign.
    `int` | `hashCode()`
    `boolean` | `isSignatureTimestamp()` Adds signature sign timestamp or not.
    `DKIMSignOptions` | `setAuid(String auid)` Sets the Agent or User Identifier(AUID)
    `DKIMSignOptions` | `setBodyCanonAlgo(CanonicalizationAlgorithm bodyCanonAlgo)` Sets the canonicalization algorithm for mail body.
    `DKIMSignOptions` | `setBodyLimit(int bodyLimit)` Sets the body limit to sign.
    `DKIMSignOptions` | `setCopiedHeaders(List<String> copiedHeaders)` Sets the copied headers used in DKIM.
    `DKIMSignOptions` | `setExpireTime(long expireTime)` Sets the expire time in seconds when the signature sign will be expired.
    `DKIMSignOptions` | `setHeaderCanonAlgo(CanonicalizationAlgorithm headerCanonAlgo)` Sets the canonicalization algorithm for signed headers.
    `DKIMSignOptions` | `setPrivateKey(String privateKey)` Sets the PKCS#8 format private key used to sign the email.
    `DKIMSignOptions` | `setPrivateKeyPath(String privateKeyPath)` Sets the PKCS#8 format private key file path.
    `DKIMSignOptions` | `setSdid(String sdid)` Sets the Singing Domain Identifier(SDID).
    `DKIMSignOptions` | `setSelector(String selector)` Sets the selector used to query the public key.
    `DKIMSignOptions` | `setSignAlgo(DKIMSignAlgorithm signAlgo)` Sets the signing algorithm.
    `DKIMSignOptions` | `setSignatureTimestamp(boolean signatureTimestamp)` Sets to enable or disable signature sign timestmap.
    `DKIMSignOptions` | `setSignedHeaders(List<String> signedHeaders)` Sets the email signedHeaders used to sign.
    `JsonObject` | `toJson()` Converts to JsonObject

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DKIMSignOptions

          public DKIMSignOptions()

      Default Constructor.

    - #### DKIMSignOptions

          public DKIMSignOptions(DKIMSignOptions other)

    - #### DKIMSignOptions

          public DKIMSignOptions(JsonObject config)

      Constructor from a JsonObject.
      Parameters:
        `config` - the JsonObject configuration

  - ### Method Detail

    - #### toJson

          public JsonObject toJson()

      Converts to JsonObject
      Returns:
        the JsonObject which represents current configuration.

    - #### getSignAlgo

          public DKIMSignAlgorithm getSignAlgo()

      Gets the signing algorithm.
      Returns:
        the signing algorithm

    - #### getPrivateKey

          public String getPrivateKey()

      Gets the PKCS#8 format private key used to sign the email.
      Returns:
        the private key

    - #### setPrivateKey

          public DKIMSignOptions setPrivateKey(String privateKey)

      Sets the PKCS#8 format private key used to sign the email.
      Parameters:
        `privateKey` - the base64 encdoing private key content.
      Returns:
        a reference to this, so the API can be used fluently

    - #### getPrivateKeyPath

          public String getPrivateKeyPath()

      Gets the PKCS#8 format private key file path.
      Returns:
        the PKCS#8 format private key file path.

    - #### setPrivateKeyPath

          public DKIMSignOptions setPrivateKeyPath(String privateKeyPath)

      Sets the PKCS#8 format private key file path.
      Parameters:
        `privateKeyPath` - The PKCS#8 format private key file path.
      Returns:
        a reference to this, so the API can be used fluently

    - #### setSignAlgo

          public DKIMSignOptions setSignAlgo(DKIMSignAlgorithm signAlgo)

      Sets the signing algorithm.
      Parameters:
        `signAlgo` - the signing algorithm
      Returns:
        a reference to this, so the API can be used fluently

    - #### getSignedHeaders

          public List<String> getSignedHeaders()

      Gets the email signedHeaders used to sign. The order in the list matters.
      Returns:
        the email signedHeaders used to sign

    - #### setSignedHeaders

          public DKIMSignOptions setSignedHeaders(List<String> signedHeaders)

      Sets the email signedHeaders used to sign.
      Parameters:
        `signedHeaders` - the email signedHeaders
      Returns:
        a reference to this, so the API can be used fluently

    - #### addSignedHeader

          public DKIMSignOptions addSignedHeader(String header)

      Adds the signed header
      Parameters:
        `header` - the header name
      Returns:
        a reference to this, so the API can be used fluently

    - #### getSdid

          public String getSdid()

      Gets the Singing Domain Identifier(SDID).
      Returns:
        the signing domain identifier

    - #### setSdid

          public DKIMSignOptions setSdid(String sdid)

      Sets the Singing Domain Identifier(SDID).
      Parameters:
        `sdid` - the signing domain identifier
      Returns:
        a reference to this, so the API can be used fluently

    - #### getSelector

          public String getSelector()

      Gets the selector used to query public key.
      Returns:
        the selector

    - #### setSelector

          public DKIMSignOptions setSelector(String selector)

      Sets the selector used to query the public key.
      Parameters:
        `selector` - the selector
      Returns:
        a reference to this, so the API can be used fluently

    - #### getHeaderCanonAlgo

          public CanonicalizationAlgorithm getHeaderCanonAlgo()

      Gets the canonicalization algorithm for signed headers.
      Returns:
        the canonicalization algorithm for signed headers

    - #### setHeaderCanonAlgo

          public DKIMSignOptions setHeaderCanonAlgo(CanonicalizationAlgorithm headerCanonAlgo)

      Sets the canonicalization algorithm for signed headers.
      Parameters:
        `headerCanonAlgo` - the canonicalization algorithm for signed headers
      Returns:
        a reference to this, so the API can be used fluently

    - #### getBodyCanonAlgo

          public CanonicalizationAlgorithm getBodyCanonAlgo()

      Gets the canonicalization algorithm for mail body.
      Returns:
        the canonicalization algorithm for mail body

    - #### setBodyCanonAlgo

          public DKIMSignOptions setBodyCanonAlgo(CanonicalizationAlgorithm bodyCanonAlgo)

      Sets the canonicalization algorithm for mail body.
      Parameters:
        `bodyCanonAlgo` - the canonicalization algorithm for mail body
      Returns:
        a reference to this, so the API can be used fluently

    - #### getAuid

          public String getAuid()

      Gets the Agent or User Identifier(AUID)
      Returns:
        the auid

    - #### setAuid

          public DKIMSignOptions setAuid(String auid)

      Sets the Agent or User Identifier(AUID)
      Parameters:
        `auid` - the AUID
      Returns:
        a reference to this, so the API can be used fluently

    - #### getBodyLimit

          public int getBodyLimit()

      Gets the body limit to sign.
      Returns:
        the body limit

    - #### setBodyLimit

          public DKIMSignOptions setBodyLimit(int bodyLimit)

      Sets the body limit to sign.
      Parameters:
        `bodyLimit` - the body limit
      Returns:
        a reference to this, so the API can be used fluently

    - #### isSignatureTimestamp

          public boolean isSignatureTimestamp()

      Adds signature sign timestamp or not.
      Returns:
        true if yes, false otherwise

    - #### setSignatureTimestamp

          public DKIMSignOptions setSignatureTimestamp(boolean signatureTimestamp)

      Sets to enable or disable signature sign timestmap. Default is disabled.
      Parameters:
        `signatureTimestamp` - if enable signature sign timestamp or not
      Returns:
        a reference to this, so the API can be used fluently

    - #### getExpireTime

          public long getExpireTime()

      Gets the expire time in seconds when the signature sign will be expired.
      Returns:
        expire time of signature. Positive value means the signature sign timestamp is enabled.

    - #### setExpireTime

          public DKIMSignOptions setExpireTime(long expireTime)

      Sets the expire time in seconds when the signature sign will be expired. Success call of this method indicates that the signature sign timestamp is enabled.
      Parameters:
        `expireTime` - the expire time in seconds
      Returns:
        a reference to this, so the API can be used fluently

    - #### getCopiedHeaders

          public List<String> getCopiedHeaders()

      Gets the copied headers used in DKIM.
      Returns:
        the copied headers

    - #### setCopiedHeaders

          public DKIMSignOptions setCopiedHeaders(List<String> copiedHeaders)

      Sets the copied headers used in DKIM.
      Parameters:
        `copiedHeaders` - the copied headers
      Returns:
        a reference to this, so the API can be used fluently

    - #### addCopiedHeader

          public DKIMSignOptions addCopiedHeader(String header)

      Adds a copied header.
      Parameters:
        `header` - an email header

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2020 Eclipse. All rights reserved.