Here you can find the source of encryptChar(String caracter, int variable, int indice)
Parameter | Description |
---|---|
caracter | the caracter |
variable | the variable |
indice | the indice |
private static String encryptChar(String caracter, int variable, int indice)
//package com.java2s; public class Main { /** The patron busqueda. */ private static String searchPattern = "9f0AwB7J8CpDud5E6FQGlxnHMbcI3K4LeUNzO1ms2PtRvSVkWXqirTYaghZjoy"; /** The patron encripta. */ private static String encryptPattern = "wxBU7nIGj9Flm8f0AH1bcK3hdi4WJ5ZLCpDeMvTQuVkXqraYE6gosyNzOP2RSt"; /**//from w w w.ja v a 2 s .c o m * Encriptar caracter. * * @param caracter * the caracter * @param variable * the variable * @param indice * the indice * @return the string */ private static String encryptChar(String caracter, int variable, int indice) { int ind; if (searchPattern.indexOf(caracter) != -1) { ind = (searchPattern.indexOf(caracter) + variable + indice) % searchPattern.length(); return encryptPattern.substring(ind, ind + 1); } return caracter; } }