-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCriptoFinal.java
More file actions
53 lines (45 loc) · 1.45 KB
/
CriptoFinal.java
File metadata and controls
53 lines (45 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*
* 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.
*/
package criptofinal;
/**
*
* @author danielsalnikov
*/
public class CriptoFinal {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Encriptar frase=new Encriptar("sample sentence to test the program");
int v[]=new int [20];
int vec[]=new int [20];
int vec2[]=new int [20];
int vec4[]=new int [20];
String vec5[]=new String [20];
int vec6[]=new int [200];
v=frase.traduccion(frase.getFrase());
vec=frase.claveNum(v);
vec2=frase.encriptarTexto(vec);
Decriptar vec3=new Decriptar(vec2,17);
vec4=vec3.decriptarTexto(vec2);
String y;
vec5=vec3.claveLetras(vec);
vec6=vec3.claveFinal(vec5);
y=vec3.traducir(vec6);
System.out.println(y);
System.out.println("\n\n");
for (int i=0;i<v.length;i++)
System.out.println(v[i]);
for (int i=0;i<vec.length;i++)
System.out.println(vec[i]);
System.out.println("\n\n");
for (int i=0;i<vec.length;i++)
System.out.println(vec2[i]);
System.out.println("\n\n");
for (int i=0;i<vec6.length;i++)
System.out.println(vec6[i]);
}
}