Willy-JL 1 gadu atpakaļ
vecāks
revīzija
4783492f5b

+ 8 - 4
totp/services/config/config.c

@@ -738,15 +738,19 @@ bool totp_config_file_ensure_latest_encryption(
     uint8_t pin_length) {
     uint8_t pin_length) {
     bool result = true;
     bool result = true;
     if(plugin_state->crypto_settings.crypto_version < CRYPTO_LATEST_VERSION) {
     if(plugin_state->crypto_settings.crypto_version < CRYPTO_LATEST_VERSION) {
-        FURI_LOG_I(LOGGING_TAG, "Migration crypto from v%" PRIu8 " to v%" PRIu8 " is needed", plugin_state->crypto_settings.crypto_version, CRYPTO_LATEST_VERSION);
-        
+        FURI_LOG_I(
+            LOGGING_TAG,
+            "Migration crypto from v%" PRIu8 " to v%" PRIu8 " is needed",
+            plugin_state->crypto_settings.crypto_version,
+            CRYPTO_LATEST_VERSION);
+
 #ifndef TOTP_OBSOLETE_CRYPTO_V1_COMPATIBILITY_ENABLED
 #ifndef TOTP_OBSOLETE_CRYPTO_V1_COMPATIBILITY_ENABLED
-        if (plugin_state->crypto_settings.crypto_version == 1) {
+        if(plugin_state->crypto_settings.crypto_version == 1) {
             furi_crash("Authenticator: Crypto v1 is not supported");
             furi_crash("Authenticator: Crypto v1 is not supported");
         }
         }
 #endif
 #endif
 #ifndef TOTP_OBSOLETE_CRYPTO_V2_COMPATIBILITY_ENABLED
 #ifndef TOTP_OBSOLETE_CRYPTO_V2_COMPATIBILITY_ENABLED
-        if (plugin_state->crypto_settings.crypto_version == 2) {
+        if(plugin_state->crypto_settings.crypto_version == 2) {
             furi_crash("Authenticator: Crypto v2 is not supported");
             furi_crash("Authenticator: Crypto v2 is not supported");
         }
         }
 #endif
 #endif

+ 1 - 1
totp/services/idle_timeout/idle_timeout.c

@@ -3,7 +3,7 @@
 #include <furi/core/timer.h>
 #include <furi/core/timer.h>
 
 
 #define IDLE_TIMER_CHECK_PERIODICITY_SEC (1)
 #define IDLE_TIMER_CHECK_PERIODICITY_SEC (1)
-#define SEC_TO_TICKS(sec) ((sec)*1000)
+#define SEC_TO_TICKS(sec) ((sec) * 1000)
 
 
 struct IdleTimeoutContext {
 struct IdleTimeoutContext {
     FuriTimer* timer;
     FuriTimer* timer;

+ 2 - 2
totp/types/token_info.c

@@ -8,8 +8,8 @@
 #include "common.h"
 #include "common.h"
 #include "../services/crypto/crypto_facade.h"
 #include "../services/crypto/crypto_facade.h"
 
 
-#define ESTIMATE_BASE32_PLAIN_LENGTH(base32_length) ((base32_length)*0.625f)
-#define ESTIMATE_BASE64_PLAIN_LENGTH(base64_length) ((base64_length)*0.75f)
+#define ESTIMATE_BASE32_PLAIN_LENGTH(base32_length) ((base32_length) * 0.625f)
+#define ESTIMATE_BASE64_PLAIN_LENGTH(base64_length) ((base64_length) * 0.75f)
 
 
 TokenInfo* token_info_alloc() {
 TokenInfo* token_info_alloc() {
     TokenInfo* tokenInfo = malloc(sizeof(TokenInfo));
     TokenInfo* tokenInfo = malloc(sizeof(TokenInfo));