提交 | 用户 | 时间
|
ce910c
|
1 |
package com.netsdk.lib.enumeration; |
H |
2 |
|
|
3 |
/** |
|
4 |
* @author 251823 |
|
5 |
* @description 无线数据加密方式 |
|
6 |
* @date 2023/03/16 11:15:26 |
|
7 |
*/ |
|
8 |
public enum EM_CFG_WIRELESS_DATA_ENCRYPT { |
|
9 |
/** |
|
10 |
* UnKnown |
|
11 |
*/ |
|
12 |
EM_CFG_WIRELESS_DATA_ENCRYPT_UNKNOWN(0, "UnKnown"), |
|
13 |
/** |
|
14 |
* NONE |
|
15 |
*/ |
|
16 |
EM_CFG_WIRELESS_DATA_ENCRYPT_NONE(1, "NONE"), |
|
17 |
/** |
|
18 |
* WEP |
|
19 |
*/ |
|
20 |
EM_CFG_WIRELESS_DATA_ENCRYPT_WEP(2, "WEP"), |
|
21 |
/** |
|
22 |
* TKIP |
|
23 |
*/ |
|
24 |
EM_CFG_WIRELESS_DATA_ENCRYPT_TKIP(3, "TKIP"), |
|
25 |
/** |
|
26 |
* AES(CCMP) |
|
27 |
*/ |
|
28 |
EM_CFG_WIRELESS_DATA_ENCRYPT_AES(4, "AES(CCMP)"), |
|
29 |
/** |
|
30 |
* TKIP+AES |
|
31 |
*/ |
|
32 |
EM_CFG_WIRELESS_DATA_ENCRYPT_TKIP_AES(5, "TKIP+AES"); |
|
33 |
|
|
34 |
private int value; |
|
35 |
|
|
36 |
private String note; |
|
37 |
|
|
38 |
public String getNote() { |
|
39 |
return note; |
|
40 |
} |
|
41 |
|
|
42 |
public int getValue() { |
|
43 |
return value; |
|
44 |
} |
|
45 |
|
|
46 |
EM_CFG_WIRELESS_DATA_ENCRYPT(int givenValue, String note) { |
|
47 |
this.value = givenValue; |
|
48 |
this.note = note; |
|
49 |
} |
|
50 |
|
|
51 |
public static String getNoteByValue(int givenValue) { |
|
52 |
for (EM_CFG_WIRELESS_DATA_ENCRYPT enumType : EM_CFG_WIRELESS_DATA_ENCRYPT.values()) { |
|
53 |
if (givenValue == enumType.getValue()) { |
|
54 |
return enumType.getNote(); |
|
55 |
} |
|
56 |
} |
|
57 |
return null; |
|
58 |
} |
|
59 |
|
|
60 |
public static int getValueByNote(String givenNote) { |
|
61 |
for (EM_CFG_WIRELESS_DATA_ENCRYPT enumType : EM_CFG_WIRELESS_DATA_ENCRYPT.values()) { |
|
62 |
if (givenNote.equals(enumType.getNote())) { |
|
63 |
return enumType.getValue(); |
|
64 |
} |
|
65 |
} |
|
66 |
return -1; |
|
67 |
} |
|
68 |
} |