done interface part, need write encrypt code
This commit is contained in:
1 parent
350e2833f2
commit
d1cb628eec
4 files changed
+107
-79
No files matched your search
@@ -69,7 +69,24 @@ enum red_crypto_keys {
|
||||
RED_PASS10
|
||||
};
|
||||
|
||||
// uint8_t storage_size = INIT_STORAGE_SIZE;
|
||||
// uint8_t storage_pass_len = INIT_STORAGE_PASS_LEN;
|
||||
# define EEPROM_PASS_OFFSET 3 + 3 + 1 + 1 + 4 + 1
|
||||
|
||||
typedef union {
|
||||
uint8_t raw[EEPROM_PASS_OFFSET + INIT_STORAGE_SIZE * INIT_STORAGE_PASS_LEN];
|
||||
struct {
|
||||
uint8_t init_var[3]; // if in eeprom is bytes "RED", then it's not first flash or first power-on, or in eeprom is old red_crypto
|
||||
uint8_t version[3]; // red_crypto library version
|
||||
uint8_t storage_size;
|
||||
uint8_t storage_pass_len;
|
||||
uint32_t memory_usage;
|
||||
uint8_t password_count;
|
||||
uint8_t passwords[INIT_STORAGE_SIZE * INIT_STORAGE_PASS_LEN];
|
||||
};
|
||||
} red_crypto_storage_eeprom;
|
||||
|
||||
red_crypto_storage_eeprom enc_pass;
|
||||
|
||||
uint8_t crypto_process_record_user(uint16_t keycode, keyrecord_t *record);
|
||||
void encrypt_pass_kuzn(void);
|
||||
|
||||
Reference in new issue
Block a user