ceshiRfid.java
2.72 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
package cn.csbr.app;
import cn.csbr.app.gui.GUIContext;
import com.csbr.util.MD5Util;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import java.io.IOException;
import static cn.csbr.app.hardware.HFbwcabinet.HFbwcabinetApi.BWInitCabinet;
//@SpringBootApplication
public class ceshiRfid extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
}
public static void main(String[] args) {
//String s="e10adc3949ba59abbe56e057f20f883e";
String s=MD5Util.md5Encode("111111");
String show = ceshiRfid.show(s);
System.out.println(show);
}
public static String show (String inStr) {
char[] a = inStr.toCharArray();
for(int i =0;i<a.length;i++){
a[i]=(char)(a[i]^'t');
}
String s = new String(a);
return s;
}
}
/*private Stage stage = null;
private GUIContext context;
public static ConfigurableApplicationContext applicationContext;
public static void main(String[] args) {
System.setProperty("jna.encoding", "GBK");
System.setProperty("jna.library.path", "/");
System.setProperty("jna.debug_load", "false");
ceshiRfid.launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
// 面板,节点放置在面板中央
Thread thread = new Thread(() -> {
try {
this.stage = primaryStage;
Button button = new Button("退出");
button.setOnMouseClicked((e)->{
System.exit(0);
});
Platform.runLater(()->{
StackPane bp = new StackPane();
GridPane gpButton = new GridPane();
gpButton.add(button,1,0);
bp.getChildren().add(gpButton);
Scene scene = new Scene(bp,300,200);
stage.setScene(scene);
stage.show();
applicationContext = SpringApplication.run(this.getClass());
context = applicationContext.getBean(GUIContext.class);
//启动指纹刷卡线程
BWInitCabinet();
});
}
catch (Exception e) {
e.printStackTrace();
}
});
thread.start();
}
*/