Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Text Obfuscation Algorithm #1336

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
380 changes: 380 additions & 0 deletions CustomTextObfuscationAlgorithm/pass.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,380 @@
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/


/**
*
* @author Shiwantha Niroshan
*/
public class main (String []args){
PasswordConvaret;
}
public class PasswordConvaret {

String a ;
String b ;
String c ;
String d ;
String e ;
String f ;
String g ;
String h ;
String i ;
String j ;
String k ;
String l ;
String m ;
String n ;
String o ;
String p ;
String q ;
String v ;
String u ;
String t ;
String s ;
String r ;
String w ;
String x ;
String y ;
String z ;
String Sa;
String Sb;
String Sc;
String Sd;
String Se;
String Sf;
String Sg;
String Sh;
String Sm;
String Sl;
String Sk;
String Sj;
String Si;
String Sn;
String So;
String Sp;
String Sq;
String Sr;
String Ss;
String St;
String Su;
String Sv;
String Sw;
String N1;
String N2;
String Sz;
String Sy;
String Sx;
String N7;
String N6;
String N5;
String N4;
String N8;
String N3;
String N9;
String N0;
String CrrentValue;
int example =0;
StringBuffer samsa=new StringBuffer("");

public String forCode(String code){

String txt_value = code;
int txt_lenth = txt_value.length();
int Mainus_txtLenth = txt_lenth - 1;



for (int sam = Mainus_txtLenth; sam > -1; sam--) {
String get_text = code;
String saa = String.valueOf(get_text.charAt(sam));


switch (saa) {
case "A":
a = "oB10";
samsa.append(a);

break;
case "B":
b = "0Q";
samsa.append(b);
break;
case "C":
c = "333";
samsa.append(c);
break;
case "D":
d = "qw24";
samsa.append(d);
break;
case "E":
e = "500qt";
samsa.append(e);
break;
case "F":
f = "3q5q6";
samsa.append(f);
break;
case "G":
g = "7z3q1";
samsa.append(g);
break;
case "H":
h = "3q1t8";
samsa.append(h);
break;
case "I":
i = "q13q9u";
samsa.append(i);
break;
case "J":
j = "Zq10Q3";
samsa.append(j);
break;
case "K":
k = "Q3c11";
samsa.append(k);
break;
case "L":
l = "4q1x2";
samsa.append(l);
break;
case "M":
m = "1x3q5";
samsa.append(m);
break;
case "N":
n = "@14a7";
samsa.append(n);
break;
case "O":
o = "8$@1!5";
samsa.append(o);
break;
case "P":
p = "q1@6@9";
samsa.append(p);
break;
case "Q":
q = "q9";
samsa.append(q);
break;
case "R":
r = "*4";
samsa.append(r);
break;
case "S":
s = "#9@2";
samsa.append(s);
break;
case "T":
t = "2@%0";
samsa.append(t);
break;
case "U":
u = "%Q%";
samsa.append(u);
break;
case "V":
v = "!ws@";
samsa.append(v);
break;
case "W":
w = "2@3w@s";
samsa.append(w);
break;
case "X":
x = "%";
samsa.append(x);
break;
case "Y":
y = "%#%";
samsa.append(y);
break;
case "Z":
z = "2#D##";
samsa.append(z);
break;

case "a":
Sa = "0qw5";
samsa.append(Sa);

break;
case "b":
Sb = "+@@+@";
samsa.append(Sb);
break;
case "c":
Sc = "w@1e2@";
samsa.append(Sc);
break;
case "d":
Sd = "$#Dws$";
samsa.append(Sd);
break;
case "e":
Se = "!5@3#a5";
samsa.append(Se);
break;
case "f":
Sf = "!@@!as$%";
samsa.append(Sf);
break;
case "g":
Sg = "%#@$";
samsa.append(Sg);
break;
case "h":
Sh = "3as1a8q";
samsa.append(Sh);
break;
case "i":
Si = "@d&f#";
samsa.append(Si);
break;
case "j":
Sj = "1@0$5#3";
samsa.append(Sj);
break;
case "k":
Sk = "@3#1$1%";
samsa.append(Sk);
break;
case "l":
Sl = "w*";
samsa.append(Sl);
break;
case "m":
Sm = "@Qa@";
samsa.append(Sm);
break;
case "n":
Sn = "1qAA13%%";
samsa.append(Sn);
break;
case "o":
So = "8@#d#s";
samsa.append(So);
break;
case "p":
Sp = "@s#d#%";
samsa.append(Sp);
break;
case "q":
Sq = "3%ew";
samsa.append(Sq);
break;
case "r":
Sr = "#s&%$d";
samsa.append(Sr);
break;
case "s":
Ss = "@s^*d#";
samsa.append(Ss);
break;
case "t":
St = "#d%s";
samsa.append(St);
break;
case "u":
Su = "s@s#2dqd#1";
samsa.append(Su);
break;
case "v":
Sv = "2*#&";
samsa.append(Sv);
break;
case "w":
Sw = "@xx3#@";
samsa.append(Sw);
break;
case "x":
Sx = "a!@@#";
samsa.append(Sx);
break;
case "y":
Sy = "!yu0@#";
samsa.append(Sy);
break;
case "z":
Sz = "#2fdwg6$0%9";
samsa.append(Sz);
break;

case "1":
N1 = "s#-#";
samsa.append(N1);
break;
case "2":
N2 = "%WsdE*";
samsa.append(N2);
break;
case "3":
N3 = "$2$t$r$^$6";
samsa.append(N3);
break;
case "4":
N4 = "182@@#";
samsa.append(N4);
break;
case "5":
N5 = "!=@";
samsa.append(N5);
break;
case "6":
N6 = "$ew#w&";
samsa.append(N6);
break;
case "7":
N7 = "q@w#s#a#";
samsa.append(N7);
break;
case "8":
N8 = "0@E^^D%F@Q";
samsa.append(N8);
break;
case "9":
N9 = "a";
samsa.append(N9);
break;
case "0":
N0 = "w@e!";
samsa.append(N0);
break;

}



}


StringBuffer Currrent =new StringBuffer();
int sampl = samsa.length();

int Mainaus = sampl-1 ;
for (int wq = Mainaus; wq > -1; wq--) {

String Current_text = String.valueOf(samsa.charAt(wq));
Currrent.append(Current_text);
}
if(example ==50){
System.out.println("" +Currrent);
}
CrrentValue =Currrent.toString();
Currrent.delete(0 ,sampl);
samsa.delete(0,sampl);
return CrrentValue;

}





}