Here you can find the source of encryptPwd(String src)
public static String encryptPwd(String src)
//package com.java2s; /******************************************************************************* * * Project : Mirage V2/* w w w. j av a 2s .c om*/ * * Package : * * Date : September 19, 2007, 11:31 PM * * Author : Praveen Kumar Ralla<pralla@miraclesoft.com> * * File : EncriptDecriptPwd.java * * Copyright 2007 Miracle Software Systems, Inc. All rights reserved. * MIRACLE SOFTWARE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * ***************************************************************************** */ public class Main { /** Creates a new instance of FormulaEncrypt */ public static String encryptPwd(String src) { //Converting String to array char asciiarr[] = src.toCharArray(); //Finding lnegth and converting into int int encryasciiarr[] = new int[src.length()]; String encrypt = ""; for (int i = 0; i < asciiarr.length; i++) { // System.out.println("The origianl value are"+ (int)asciiarr[i]); int asciichar = (int) asciiarr[i] + 2; int accharmul2 = asciichar * 2; encryasciiarr[i] = accharmul2; } for (int j = 0; j < encryasciiarr.length; j++) { //System.out.println("The ascii char are"+encryasciiarr[j]); encrypt = encrypt + "@" + encryasciiarr[j]; } // System.out.println("The enc is"+encrypt); return encrypt; } }