JD-GUI 打开 jar、class 还原代码
https://java-decompiler.github.io/
1.10.3. 附件解密
https://open.seeyon.com/seeyon/webhelp/APIdoc/content/ch10s03.html
系统中存储的附件都按设置的加密算法进行了加密,如果要手动对存储的附件进行解密,可以调用CoderFactory.getInstance().download方法(依赖seeyon\WEB-INF\lib\seeyon_ctp_core.jar),如下所示。
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
| import com.seeyon.ctp.common.encrypt.CoderFactory;
/**
* 解密附件。
* @param input 附件文件对象
* @param output 解密后的附件
* @throws Exception
*/
public void decrypt(File input, File output) throws Exception {
FileOutputStream fop = null;
FileInputStream fin = null;
try {
fop = new FileOutputStream(output);
fin = new FileInputStream(input);
CoderFactory.getInstance().download(fin, fop);
fop.flush();
fop.close();
} catch (Exception e) {
throw e;
} finally {
try {
if (fop != null) {
fop.close();
}
if (fin != null) {
fin.close();
}
} catch (IOException e) {
}
}
}
|