com.isti.quakewatch.util
Class EncryptDecryptUtil

java.lang.Object
  extended by com.isti.quakewatch.util.EncryptDecryptUtil
All Implemented Interfaces:
EncryptDecryptIntf

public class EncryptDecryptUtil
extends java.lang.Object
implements EncryptDecryptIntf

Class EncryptDecryptUtil defines utility encrypt/decrypt methods for QuakeWatch


Constructor Summary
EncryptDecryptUtil(java.lang.String key1Str, java.lang.String key2Str)
          Creates an encrypt/decrypt utility.
 
Method Summary
 java.lang.String decrypt(java.lang.String dataStr)
          Decrypts the given string.
 java.lang.String encrypt(java.lang.String dataStr)
          Encrypts the given string.
 boolean isEncryptStr(java.lang.String dataStr)
          Determines if the given data string is in the format of a string that has been encrypted by this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EncryptDecryptUtil

public EncryptDecryptUtil(java.lang.String key1Str,
                          java.lang.String key2Str)
Creates an encrypt/decrypt utility.

Parameters:
key1Str - key string to use.
key2Str - key string to use.
Method Detail

encrypt

public java.lang.String encrypt(java.lang.String dataStr)
Encrypts the given string.

Specified by:
encrypt in interface EncryptDecryptIntf
Parameters:
dataStr - data string to use.
Returns:
encrypted string, or null if the data string is invalid.

decrypt

public java.lang.String decrypt(java.lang.String dataStr)
Decrypts the given string.

Specified by:
decrypt in interface EncryptDecryptIntf
Parameters:
dataStr - data string to use.
Returns:
decrypted string, or null if the data string is invalid.

isEncryptStr

public boolean isEncryptStr(java.lang.String dataStr)
Determines if the given data string is in the format of a string that has been encrypted by this class.

Specified by:
isEncryptStr in interface EncryptDecryptIntf
Parameters:
dataStr - data strign to use.
Returns:
true if the given data string is in the format of a string that has been encrypted by this class.