Class AddressValidationHelper

java.lang.Object
org.deltava.security.AddressValidationHelper

public final class AddressValidationHelper extends Object
A helper class to calculate hash code values for e-mail address validation.
Since:
1.0
Version:
7.0
Author:
Luke
  • Method Details

    • calculateHashCode

      public static String calculateHashCode(String addr)
      Calculates the validate hash code for an e-mail address, converted to Base64.
      Parameters:
      addr - the e-mail address
      Returns:
      the hash code
      Throws:
      NullPointerException - if addr is null
    • calculateCRC32

      public static String calculateCRC32(String addr)
      Calculates the validate hash code for an e-mail address using CRC32, converted to hexadecimal.
      Parameters:
      addr - the e-mail address
      Returns:
      the hash code
      Throws:
      NullPointerException - if addr is null
    • formatHash

      public static String formatHash(CharSequence rawHash)
      Restores a submitted hashcode even after IE has converted the plus signs to spaces.
      Parameters:
      rawHash - the raw hash code
      Returns:
      the restored hash code with spaces converted to plus signs