Merge branch 'master' of gitee.com:willfree/min-dev-java

This commit is contained in:
free will committed 2021-05-14 15:29:56 +08:00
commit 6685a926d3
7 files changed
+104 -34

No files matched your search

@@ -162,6 +162,11 @@ public class ControlParameters implements IEncodingAble {
Block newBlock = elementContainer.getBlock(i);
int type = newBlock.getType().getVlIntValue2Int();
switch (type) {
case TLV.TlvManagementLogicFaceId:
if (!this.controlParameterLogicFaceId.wireDecode(newBlock)) {
return false;
}
break;
case TLV.TlvManagementPrefix:
if (!this.controlParameterPrefix.wireDecode(newBlock)) {
return false;
+5
View File
@@ -1,5 +1,6 @@
package mgmt;
import com.fasterxml.jackson.annotation.JsonProperty;
import util.JSONHelper;
import util.JSONHelperException;
@@ -28,15 +29,19 @@ public class ControlResponse {
public static final String ControlResponseTypeBytes = "bytes";
// Data类型
@JsonProperty("Type")
public String type;
// 状态码
@JsonProperty("Code")
public int code;
// 信息
@JsonProperty("Msg")
public String msg;
// 数据
public class ControlResponseData<E>{
public E value;
}
@JsonProperty("Data")
public ControlResponseData data=new ControlResponseData();
public ControlResponse(){
@@ -1,9 +1,11 @@
package minsecurity.identity.persist.sqlite;
import org.sqlite.mc.SQLiteMCConfig;
import org.sqlite.mc.SQLiteMCSqlCipherConfig;
import java.io.File;
import java.sql.*;
import java.util.Properties;
/*
* @Author: zhengqi wu
@@ -80,8 +82,12 @@ public class Sqlite {
new File(db_path).mkdirs();
}
String real_db_file = db_path + db_file;
// 兼容sqlcipher
c = DriverManager.getConnection("jdbc:sqlite:" + real_db_file, SQLiteMCSqlCipherConfig.getV4Defaults().withKey(passwd2HexKey()).toProperties());
SQLiteMCSqlCipherConfig sqlCipherConfig = SQLiteMCSqlCipherConfig.getV4Defaults();
SQLiteMCConfig config = sqlCipherConfig.withKey(passwd2HexKey());
Properties properties = config.toProperties();
c = DriverManager.getConnection("jdbc:sqlite:" + real_db_file, properties);
stmt = c.createStatement();
stmt.executeUpdate(table_create);
stmt.close();