Java String Descrypt decryptPwd(String enc)

Here you can find the source of decryptPwd(String enc)

Description

decrypt Pwd

License

Open Source License

Declaration

public static String decryptPwd(String enc) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 *
 * Project : Mirage V2/*from  w w w . j a v a2  s  .co  m*/
 *
 * 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 {
    public static String decryptPwd(String enc) {

        String asarr[] = enc.split("@");
        //variable declaration

        int inval = 0;
        String instr = ".";
        String instr1 = "";
        String orval = "";
        for (int lk = 0; lk < asarr.length; lk++) {

            //System.out.println("Values are"+asarr[lk]);
            if (asarr[lk].equalsIgnoreCase(""))

            {

                instr = asarr[lk];
                //System.out.println("The value with null"+instr);

            } else {
                instr1 = asarr[lk];
                inval = Integer.parseInt(instr1);
                //System.out.println("Int values are"+inval);
                int divval = inval / 2;
                int minusval = divval - 2;

                orval = orval + (char) minusval;

            }
            //  System.out.println("orignal Values are"+orval.trim());

        }

        return orval;

    }
}

Related

  1. decryptChar(String pwd, int offset, int pos)
  2. decryptCharcode(char c, int start, int end, int offset)
  3. decryptEmailId(String encryptedEmailId)
  4. decryptL(byte[] bytes, int length)
  5. decryptMailAdress(String enc, int offset)