public static String decrypt(String password){
  if (password.startsWith("encrypted(") && password.endsWith(")")) {
    byte[] decrypted=null;
    try {
      String toDecrypt=password.substring(10,password.length() - 1);
      SecretKeySpec key=new SecretKeySpec(init,"Blowfish");
      Cipher cipher=Cipher.getInstance("Blowfish");
      cipher.init(Cipher.DECRYPT_MODE,key);
      decrypted=cipher.doFinal(hexStringToByteArray(toDecrypt));
      return new String(decrypted);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
  return password;
}

public static String decrypt ( String password ) { if ( password . startsWith ( "encrypted(" ) && password . endsWith ( ")" ) ) { byte [ ] decrypted = null ; try { String toDecrypt = password . substring ( 10 , password . length ( ) - 1 ) ; SecretKeySpec key = new SecretKeySpec ( init , "Blowfish" ) ; Cipher cipher = Cipher . getInstance ( "Blowfish" ) ; cipher . init ( Cipher . DECRYPT_MODE , key ) ; decrypted = cipher . doFinal ( hexStringToByteArray ( toDecrypt ) ) ; return new String ( decrypted ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } return password ; }
decrypts an encrypted password string .
