Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
fbt format
Browse files Browse the repository at this point in the history
  • Loading branch information
xMasterX committed Mar 2, 2024
1 parent 57c2515 commit 0cfdb53
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions totp/services/config/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -738,15 +738,19 @@ bool totp_config_file_ensure_latest_encryption(
uint8_t pin_length) {
bool result = true;
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
if (plugin_state->crypto_settings.crypto_version == 1) {
if(plugin_state->crypto_settings.crypto_version == 1) {
furi_crash("Authenticator: Crypto v1 is not supported");
}
#endif
#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");
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion totp/services/idle_timeout/idle_timeout.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <furi/core/timer.h>

#define IDLE_TIMER_CHECK_PERIODICITY_SEC (1)
#define SEC_TO_TICKS(sec) ((sec)*1000)
#define SEC_TO_TICKS(sec) ((sec) * 1000)

struct IdleTimeoutContext {
FuriTimer* timer;
Expand Down
4 changes: 2 additions & 2 deletions totp/types/token_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#include "common.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* tokenInfo = malloc(sizeof(TokenInfo));
Expand Down

0 comments on commit 0cfdb53

Please sign in to comment.