Package net.markenwerk.utils.mail.dkim
Enum Canonicalization
- java.lang.Object
-
- java.lang.Enum<Canonicalization>
-
- net.markenwerk.utils.mail.dkim.Canonicalization
-
- All Implemented Interfaces:
Serializable
,Comparable<Canonicalization>
public enum Canonicalization extends Enum<Canonicalization>
Provides "simple" and "relaxed" canonicalization according to RFC 4871.- Since:
- 1.0.0
- Author:
- Torsten Krause (tk at markenwerk dot net), Florian Sager
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract String
canonicalizeBody(String body)
abstract String
canonicalizeHeader(String name, String value)
String
getType()
static Canonicalization
valueOf(String name)
Returns the enum constant of this type with the specified name.static Canonicalization[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SIMPLE
public static final Canonicalization SIMPLE
The "simple" canonicalization algorithm. The body canonicalization algorithm converts *CRLF at the end of the body to a single CRLF.
-
RELAXED
public static final Canonicalization RELAXED
The "relaxed" canonicalization algorithm. The body canonicalization algorithm MUST reduce whitespace and ignore all empty lines at the end of the message body.
-
-
Method Detail
-
values
public static Canonicalization[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Canonicalization c : Canonicalization.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Canonicalization valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getType
public final String getType()
-
-