Java String Encrypt encryptEmailId(String emailId)

Here you can find the source of encryptEmailId(String emailId)

Description

Method to encrypt email id

License

Apache License

Parameter

Parameter Description
emailId a parameter

Return

encrypted email id

Declaration

public static String encryptEmailId(String emailId) 

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  ww. j a  va2s. c o  m*/
     * Method to encrypt email id
     * @param emailId
     * @return encrypted email id
     */
    public static String encryptEmailId(String emailId) {
        char[] letters = emailId.toCharArray();
        StringBuilder encriptedEmailId = new StringBuilder();

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

Related

  1. encryptBankCardNo(String cardNo)
  2. encryptBankCardNoLast4Bits(String cardNo)
  3. encryptBytes(final byte[] b, final int i)
  4. encryptChar(String caracter, int variable, int indice)
  5. EncryptDecrypt(String value)
  6. encryptIfNotEncrypted(String s)
  7. encryption(String str, int k)
  8. encryptPlayerChat(byte[] is, int i_25_, int i_26_, int i_27_, byte[] is_28_)
  9. encryptPwd(String src)