Class EmailAddressEncoding
java.lang.Object
ch.tocco.nice2.optional.cms.impl.publish.model.EmailAddressEncoding
Static class to encode email addresses.
Encoding algorithm (i.e. "test@example.com"):
1. Build a string of char codes, separated by comma
(i.e. "116,101,115,116,64,101,120,97,109,112,108,101,46,99,111,109")
2. Encode Base64
(i.e. "MTE2LDEwMSwxMTUsMTE2LDY0LDEwMSwxMjAsOTcsMTA5LDExMiwxMDgsMTAxLDQ2LDk5LDExMSwxMDk=")
3. Surround with tag "[tocco-encoded-addr:<base64>]"
(i.e. "[tocco-encoded-addr:MTE2LDEwMSwxMTUsMTE2LDY0LDEwMSwxMjAsOTcsMTA5LDExMiwxMDgsMTAxLDQ2LDk5LDExMSwxMDk=]")
-
Method Summary
-
Method Details
-
encode
Encode an email address.- Parameters:
email
- The email address to encode.- Returns:
- the encoded email address.
-