Here you can find the source of encryptEmailId(String emailId)
Parameter | Description |
---|---|
emailId | a parameter |
public static String encryptEmailId(String emailId)
//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(); } }