expanded storage size and password length
This commit is contained in:
1 parent
c615c136b1
commit
6d8cbd1277
3 files changed
+97
-20
No files matched your search
+25
-3
@@ -25,14 +25,36 @@
|
||||
|
||||
# define MAX_KEY_LEN 128
|
||||
|
||||
# ifndef STORAGE_SIZE
|
||||
# define STORAGE_SIZE 4
|
||||
# endif
|
||||
|
||||
# ifdef STORAGE_PASS_LEN
|
||||
# if STORAGE_PASS_LEN % 16 != 0
|
||||
# error Storage password length must be a multiple of 16
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# ifndef STORAGE_PASS_LEN
|
||||
# define STORAGE_PASS_LEN 64
|
||||
# endif
|
||||
|
||||
|
||||
//example for encrypted 64 byte password
|
||||
// const uint8_t red_enc_pass[STORAGE_SIZE][STORAGE_PASS_LEN] = {
|
||||
// {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
// 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
|
||||
// };
|
||||
|
||||
enum red_crypto_keys {
|
||||
RED_CRY_M = SAFE_RANGE + 0x80, // added safe range offset
|
||||
RED_RNG,
|
||||
RED_TEST,
|
||||
RED_PASS1,
|
||||
RED_PASS2
|
||||
RED_PASS1, RED_PASS2, RED_PASS3, RED_PASS4, RED_PASS5, RED_PASS6, RED_PASS7, RED_PASS8, RED_PASS9, RED_PASS10, RED_PASS11, RED_PASS12
|
||||
};
|
||||
|
||||
uint8_t crypto_process_record_user(uint16_t keycode, keyrecord_t *record, const uint8_t encrypted_passwords[2][16]);
|
||||
uint8_t crypto_process_record_user(uint16_t keycode, keyrecord_t *record, const uint8_t encrypted_passwords[STORAGE_SIZE][STORAGE_PASS_LEN]);
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user