creotiv / MiBand2

Library to work with Xiaomi MiBand 2
Creative Commons Zero v1.0 Universal
544 stars 173 forks source link

AES encryption question #34

Closed aytunch closed 4 years ago

aytunch commented 4 years ago

I am trying to port your code in to Dart. The first 2 steps of the authorization it works fine however MiBand does not like my encrypted randomkey. So I must be doing something wrong.

My Secret Key is 16 charachters long(same as yours) The Random key MiBand gives is the same length.

Question is; How long the encrypted key that we need to send to the MiBand2 should be? After I encrypt randomkey using SecretKey+AES I get a 32 character long value which is twice as large as the secretkey&randomkey. Is this my problem? What should I do?

creotiv commented 4 years ago

Check that encryption in python and dart gives same output