org.deltava.security
Class AddressValidationHelper

java.lang.Object
  extended by 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:
2.6
Author:
Luke

Method Summary
static String calculateCRC32(String addr)
          Calculates the validate hash code for an e-mail address using CRC32, converted to hexadecimal.
static String calculateHashCode(String addr)
          Calculates the validate hash code for an e-mail address, converted to Base64.
static String formatHash(CharSequence rawHash)
          Restores a submitted hashcode even after IE has converted the plus signs to spaces.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

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


Copyright © 2004-2009 Global Virtual Airlines Group. All Rights Reserved.