mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-01-03 18:59:43 +03:00
Update keeloq_common.c
This commit is contained in:
parent
d033b102ea
commit
dbe1d9114e
@ -91,11 +91,10 @@ inline uint64_t
|
||||
|
||||
inline uint64_t
|
||||
subghz_protocol_keeloq_common_faac_learning(const uint32_t seed, const uint32_t key) {
|
||||
uint32_t k1, k2;
|
||||
uint16_t hs = seed >> 16;
|
||||
const uint16_t ending = 0x544D;
|
||||
uint32_t lsb = (uint32_t)hs << 16 | ending;
|
||||
k1 = subghz_protocol_keeloq_common_encrypt(seed, key);
|
||||
k2 = subghz_protocol_keeloq_common_encrypt(lsb, key);
|
||||
return ((uint64_t)k1 << 32) | k2;
|
||||
uint64_t man = (uint64_t)subghz_protocol_keeloq_common_encrypt(seed, key) << 32 |
|
||||
subghz_protocol_keeloq_common_encrypt(lsb, key);
|
||||
return man;
|
||||
}
|
Loading…
Reference in New Issue
Block a user