bionicbone / 433mhz_Rolling_Code

quichip Add Rolling Code Protection
GNU General Public License v3.0
12 stars 3 forks source link

Allow rollingCode[] to be a length that cause multiple runs with different combinations #2

Closed bionicbone closed 8 months ago

bionicbone commented 8 months ago

Currently rollingCode[] is consumed in blocks of sizeofSendingRollingCode, when it reaches the end everything resets and we start again at the begining of rollingCode[]

Two thoughts,

  1. Change the sizeofSendingRollingCode to be different, thus no longer repeating an already used code.
  2. Alter so that we end with a situation where we use the last number in the sequence and the first numbers to make up to the length set be sizeofSendingRollingCode, thus if sizeofSendingRollingCode = 7 then rollingCode[] will be played 7 times before repeating.
  3. Impliment this -- Best solution, at the end on the loop add a known init-value to all the numbers in the loop.

Also Consider: Sending the same code over and over again would be ignored by the code !!

bionicbone commented 8 months ago

This has been implimented Once the loop of codes has been used change the numbers by a predetermined init-value to all numbers in rollingCode[], thus the codes would never cycle, and when the init-value is added there will be no way to reverse engineer the init-value from the previous last value in the loop to the next first number in the loop, unless you had recorded the first number and somehow worked out the loop was about to renew.