src/java/fr/jayasoft/ivy/util/StringUtils.java
/**
     * Encrypt the given string in a way which anybody having access to this method
     * algorithm can easily decrypt.
     * 
     * This is useful only to avoid clear string storage in a file for example,
     * but shouldn't be considered as a real mean of security.
     * 
     * This only works with simple characters (char < 256).
     * @param str the string to encrypt
     * @return the encrypted version of the string
     */
Encrypt the given string in a way which anybody having access to this method
algorithm can easily decrypt.

This is useful only to avoid clear string storage in a file for example,
but shouldn't be considered as a real mean of security.

This only works with simple characters (char < 256).
@param str the string to encrypt
@return the encrypted version of the string
Encrypt the given string in a way which anybody having access to this method algorithm can easily decrypt . This is useful only to avoid clear string storage in a file for example but shouldn ' t be considered as a real mean of security . This only works with simple characters ( char < 256 ) . @param str the string to encrypt @return the encrypted version of the string
public final static String encrypt(String str) {
    	if (str == null) {
    		return null;
    	}
        StringBuffer buf = new StringBuffer();
        for (int i = 0; i < str.length(); i++) {
            char c = str.charAt(i);
            if (c >= SHIFTS.length) {
            	throw new IllegalArgumentException("encrypt method can only be used with simple characters. '"+c+"' not allowed");
            }
			buf.append(SHIFTS[c]);
        }
        return buf.toString();
    }
public final static String encrypt ( String str ) { if ( str == null ) { return null ; } StringBuffer buf = new StringBuffer ( ) ; for ( int i = 0 ; i < str . length ( ) ; i ++ ) { char c = str . charAt ( i ) ; if ( c >= SHIFTS . length ) { throw new IllegalArgumentException ( "encrypt method can only be used with simple characters. '" + c + "' not allowed" ) ; } buf . append ( SHIFTS [ c ] ) ; } return buf . toString ( ) ; }
Encrypt the given string in a way which anybody having access to this method
 algorithm can easily decrypt.
Encrypt the given string in a way which anybody having access to this method algorithm can easily decrypt .