[FL-2045] SubGhz: new protocol (GSN , Beninca/Allmatic, Elmes) and validator (#958)
* SubGhz: add new method of obtaining a manufactory code subghz_protocol_keeloq_common_magic_xor_type1_learning * TextInput: checking for a lock on a file with the same name * TextInput: fix checking for a lock on a file with the same name * Assets: rename and recompile * TextInput: added picture and timer to turn off blob * TextInput: Fix graphics * TextInput: fix validator * Validators: Add validator is file * TextInput: fix callback validator_is_file_alloc * SubGhz: add propocol GNS (dimamic), Beninca/Alcatic, Elmes * SubGhz: fix function description * Gui: correct timer routine on deallocation * Format sources Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -53,7 +53,7 @@ inline uint64_t subghz_protocol_keeloq_common_normal_learning(uint32_t data, con
|
||||
|
||||
/** Secure Learning
|
||||
* @param data - serial number (28bit)
|
||||
* @param seed - serial number (32bit)
|
||||
* @param seed - seed number (32bit)
|
||||
* @param key - manufacture (64bit)
|
||||
* @return manufacture for this serial number (64bit)
|
||||
*/
|
||||
@@ -69,4 +69,16 @@ inline uint64_t subghz_protocol_keeloq_common_secure_learning(
|
||||
k2 = subghz_protocol_keeloq_common_decrypt(seed, key);
|
||||
|
||||
return ((uint64_t)k1 << 32) | k2;
|
||||
}
|
||||
|
||||
/** Magic_xor_type1 Learning
|
||||
* @param data - serial number (28bit)
|
||||
* @param xor - magic xor (64bit)
|
||||
* @return manufacture for this serial number (64bit)
|
||||
*/
|
||||
|
||||
inline uint64_t
|
||||
subghz_protocol_keeloq_common_magic_xor_type1_learning(uint32_t data, uint64_t xor) {
|
||||
data &= 0x0FFFFFFF;
|
||||
return (((uint64_t)data << 32) | data) ^ xor;
|
||||
}
|
Reference in New Issue
Block a user