@@ -8,11 +8,11 @@ use num_derive::FromPrimitive;
88#[ repr( u8 ) ]
99pub enum KeyType {
1010 /// No key type.
11- None ,
11+ None = 0 ,
1212 /// This is the network key, used for encrypting and decrypting network payloads.
1313 ///
1414 /// There is only one of these keys in storage.
15- Network ,
15+ Network = 1 ,
1616 /// This is the Trust Center Link Key.
1717 ///
1818 /// On the joining device, this is the APS key used to communicate with the trust center.
@@ -21,7 +21,7 @@ pub enum KeyType {
2121 /// `EMBER_TRUST_CENTER_USES_HASHED_LINK_KEY` bit set).
2222 ///
2323 /// There is only one of these keys in storage.
24- TcLink ,
24+ TcLink = 2 ,
2525 /// This is a Trust Center Link Key, but it times out after either
2626 ///
2727 /// - `EMBER_TRANSIENT_KEY_TIMEOUT_S` or
@@ -36,29 +36,29 @@ pub enum KeyType {
3636 /// of keys before attempting to join.
3737 ///
3838 /// This is an indexed key, and local storage can fit as many keys as available RAM allows.
39- TcLinkWithTimeout ,
39+ TcLinkWithTimeout = 3 ,
4040 /// This is an Application link key.
4141 ///
4242 /// On both joining devices and the trust center, this key is used in APS encryption and
4343 /// decryption when communicating to a joining device.
4444 ///
4545 /// This is an indexed key table of size `EMBER_KEY_TABLE_SIZE`, so long as there is sufficient
4646 /// nonvolatile memory to store keys.
47- AppLink ,
47+ AppLink = 4 ,
4848 /// This is the ZLL encryption key for use by algorithms that require it.
49- ZllEncryptionKey ,
49+ ZllEncryptionKey = 5 ,
5050 /// For ZLL, this is the pre-configured link key used during classical `ZigBee` commissioning.
51- ZllPreconfiguredKey ,
51+ ZllPreconfiguredKey = 6 ,
5252 /// This is a Green Power Device (GPD) key used on a Proxy device.
53- GreenPowerProxyTableKey ,
53+ GreenPowerProxyTableKey = 7 ,
5454 /// This is a Green Power Device (GPD) key used on a Sink device.
55- GreenPowerSinkTableKey ,
55+ GreenPowerSinkTableKey = 8 ,
5656 /// his is a generic key type intended to be loaded for one-time hashing or crypto operations.
5757 ///
5858 /// This key is not persisted.
5959 ///
6060 /// Intended for use by the Zigbee stack.
61- Internal ,
61+ Internal = 9 ,
6262}
6363
6464impl Display for KeyType {
0 commit comments