-
Notifications
You must be signed in to change notification settings - Fork 2
/
ExtractProcess.java
executable file
·42 lines (27 loc) · 1.25 KB
/
ExtractProcess.java
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
import java.io.*;
public class ExtractProcess {
private EmbedExtractOptions eo;
private static File f; // carrier file
private static byte[] carrier; // carrier data
private static int[] coeff; // dct values
private static FileOutputStream fos; // embedded file (output file)
private static String embFileName; // output file name
private static String password;
/** Creates a new instance of ExtractProcess */
public ExtractProcess(EmbedExtractOptions eo) {
this.eo = eo;
this.f = eo.getInputFile();
embFileName = eo.getOutputFile().getAbsolutePath();
password = eo.getPassword();
}
public void startExtract(){
System.out.println("Extracting....");
System.out.println("Audio File" + eo.getInputFile().getAbsolutePath());
System.out.println("File" + embFileName);
System.out.println("PWD" + password);
Stego unveil = new Stego(eo.getInputFile().getAbsolutePath(),embFileName,password.toCharArray());
if (!unveil.decode())
System.out.println("Error occured during decrypt!, may be the message is too big.");
System.out.println("Completed");
}
}