Java String Descrypt decryptEmailId(String encryptedEmailId)

Here you can find the source of decryptEmailId(String encryptedEmailId)

Description

Method to decrypt email id

License

Apache License

Parameter

Parameter Description
emailId a parameter

Return

decrypted email id

Declaration

public static String decryptEmailId(String encryptedEmailId) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    private static final int M_FACTOR = 3;
    private static final int S_FACTOR = 7;

    /**//from w  w  w . j  a  va2s. co m
     * Method to decrypt email id
     * @param emailId
     * @return decrypted email id
     */
    public static String decryptEmailId(String encryptedEmailId) {
        char[] letters = encryptedEmailId.toCharArray();
        StringBuilder decriptedEmailId = new StringBuilder();

        for (int index = 0; index < letters.length; index++) {
            int code = letters[index];
            decriptedEmailId.append((char) ((code + S_FACTOR) / M_FACTOR));
        }
        return decriptedEmailId.toString();
    }
}

Related

  1. decrypt(String string)
  2. decrypt2(byte[] arg0, int arg1, String arg2, byte arg3)
  3. decryptBytes(final byte[] b, final int i)
  4. decryptChar(String pwd, int offset, int pos)
  5. decryptCharcode(char c, int start, int end, int offset)
  6. decryptL(byte[] bytes, int length)
  7. decryptMailAdress(String enc, int offset)
  8. decryptPwd(String enc)