修改中文乱码,测试接口
This commit is contained in:
@@ -3,6 +3,8 @@ package com.sunyard.inf;
|
||||
import com.sun.org.apache.xml.internal.security.exceptions.Base64DecodingException;
|
||||
import com.sunyard.RetWrap;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
|
||||
/**
|
||||
* 对称加解密相关接口
|
||||
*/
|
||||
@@ -300,7 +302,7 @@ interface SydSYMApi {
|
||||
* @param outFilePath 解密后的数据文件所在的路径
|
||||
* @return 解密是否成功。false为失败,true为成功
|
||||
*/
|
||||
boolean SM4DecryptFileDataCBC(int keyType, String key, int inType, int outType, String inFilePath, String outFilePath);
|
||||
boolean SM4DecryptFileDataCBC(int keyType, String key, int inType, int outType, String inFilePath, String outFilePath) throws UnsupportedEncodingException;
|
||||
|
||||
/**
|
||||
* 使用SM4算法进行解密,其中加密模式为CBC,
|
||||
|
||||
@@ -65,9 +65,9 @@ public class FileUtil {
|
||||
* @param data 数据
|
||||
*/
|
||||
public static void printDataToFile(String path, String data) {
|
||||
OutputStreamWriter osw = null;
|
||||
BufferedWriter osw = null;
|
||||
try {
|
||||
osw = new OutputStreamWriter(new FileOutputStream(path));
|
||||
osw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path), "UTF-8"));
|
||||
|
||||
osw.write(data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user