mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-13 05:06:30 +04:00
keeeloq update
This commit is contained in:
@@ -101,4 +101,15 @@ inline uint64_t
|
||||
uint64_t man = (uint64_t)subghz_protocol_keeloq_common_encrypt(seed, key) << 32 |
|
||||
subghz_protocol_keeloq_common_encrypt(lsb, key);
|
||||
return man;
|
||||
}
|
||||
}
|
||||
/** Magic_serial_type1 Learning
|
||||
* @param data - serial number (28bit)
|
||||
* @param man - magic man (64bit)
|
||||
* @return manufacture for this serial number (64bit)
|
||||
*/
|
||||
|
||||
inline uint64_t
|
||||
subghz_protocol_keeloq_common_magic_serial_type1_learning(uint32_t data, uint64_t man) {
|
||||
return man | ((uint64_t)data << 40) |
|
||||
((uint64_t)(((data & 0xff) + ((data >> 8) & 0xFF)) & 0xFF) << 32);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user