|
@@ -411,7 +411,7 @@ public class FileSECUtils {
|
|
|
public static String getFileUrlByEncodeSEC(String path,InputStream inputStream) {
|
|
|
File tempFile = null;
|
|
|
try {
|
|
|
- logger.info("--------------SEC附件解密 processFileWithSEC1 ----------------");
|
|
|
+ logger.info("--------------SEC附件加密 processFileWithSEC1 ----------------");
|
|
|
String filename = getFileNameWithoutExtension(path);
|
|
|
String filetype = getFileType(filename);
|
|
|
/**
|
|
@@ -451,15 +451,15 @@ public class FileSECUtils {
|
|
|
long fileSize = tempFile.length();
|
|
|
|
|
|
// 4. 调用解密方法
|
|
|
- InputStream decryptedInputStream = decodeFileForSEC(fileSize, new FileInputStream(tempFile));
|
|
|
+ InputStream decryptedInputStream = encodeFileForSEC(fileSize, new FileInputStream(tempFile));
|
|
|
if (decryptedInputStream == null) {
|
|
|
- logger.info("--------------SEC附件解密,文件解密失败----------------");
|
|
|
+ logger.info("--------------SEC附件加密,文件解密失败----------------");
|
|
|
return "";
|
|
|
}
|
|
|
|
|
|
// 5. 删除临时文件
|
|
|
if (!tempFile.delete()) {
|
|
|
- logger.info("--------------SEC附件解密,无法删除临时文件----------------");
|
|
|
+ logger.info("--------------SEC附件加密,无法删除临时文件----------------");
|
|
|
}
|
|
|
|
|
|
String url = getDownloadUrl(filename, decryptedInputStream);
|
|
@@ -469,7 +469,7 @@ public class FileSECUtils {
|
|
|
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
- logger.info("--------------SEC附件解密 处理过程中发生错误1: " + e.getMessage());
|
|
|
+ logger.info("--------------SEC附件加密 处理过程中发生错误1: " + e.getMessage());
|
|
|
return null;
|
|
|
} finally {
|
|
|
try {
|
|
@@ -478,7 +478,7 @@ public class FileSECUtils {
|
|
|
}
|
|
|
} catch (IOException e) {
|
|
|
e.printStackTrace();
|
|
|
- logger.info("--------------SEC附件解密 处理过程中发生错误2: " + e.getMessage());
|
|
|
+ logger.info("--------------SEC附件加密 处理过程中发生错误2: " + e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
}
|