File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -27,22 +27,26 @@ public class Controller : IDisposable
2727 {
2828 private byte [ ] LTPK ;
2929 private byte [ ] LTSK ;
30- private byte [ ] DeviceID ;
30+ private byte [ ] deviceID ;
3131 private List < HomeKitEndPoint > endpoints = new List < HomeKitEndPoint > ( ) ;
3232
33- public Controller ( )
33+ public Controller ( out byte [ ] publicKey , out byte [ ] privateKey )
3434 {
3535 byte [ ] seed = RandomNumberGenerator . GetBytes ( 32 ) ;
3636 Ed25519 . KeyPairFromSeed ( out LTPK , out LTSK , seed ) ;
37- DeviceID = RandomNumberGenerator . GetBytes ( 16 ) ;
37+ deviceID = RandomNumberGenerator . GetBytes ( 16 ) ;
38+ publicKey = LTPK ;
39+ privateKey = LTSK ;
3840 }
3941 public Controller ( byte [ ] privateKey , byte [ ] publicKey , byte [ ] deviceID )
4042 {
4143 LTPK = publicKey ;
4244 LTSK = privateKey ;
43- DeviceID = deviceID ;
45+ this . deviceID = deviceID ;
4446 }
4547
48+ public byte [ ] DeviceID { get { return deviceID ; } }
49+
4650 public async Task < HomeKitEndPoint > Connect ( IPEndPoint destination , byte [ ] accessoryID , byte [ ] accessoryLTPK )
4751 {
4852 X25519 session = new X25519 ( ) ;
You can’t perform that action at this time.
0 commit comments