fix multiple sprint_hex

This commit is contained in:
merlokk 2021-07-07 16:16:45 +03:00
commit 857ce0ea17

View file

@ -220,12 +220,14 @@ void DesfirePrintContext(DesfireContext *ctx) {
CLIGetOptionListStr(DesfireCommunicationModeOpts, ctx->commMode)); CLIGetOptionListStr(DesfireCommunicationModeOpts, ctx->commMode));
if (DesfireIsAuthenticated(ctx)) { if (DesfireIsAuthenticated(ctx)) {
PrintAndLogEx(INFO, "Session key MAC [%d]: %s ENC: %s IV [%d]: %s", PrintAndLogEx(INFO, "Session key MAC [%d]: %s ",
desfire_get_key_length(ctx->keyType), desfire_get_key_length(ctx->keyType),
sprint_hex(ctx->sessionKeyMAC, desfire_get_key_length(ctx->keyType)), sprint_hex(ctx->sessionKeyMAC, desfire_get_key_length(ctx->keyType)));
sprint_hex(ctx->sessionKeyEnc, desfire_get_key_length(ctx->keyType)), PrintAndLogEx(INFO, " ENC: %s",
sprint_hex(ctx->sessionKeyEnc, desfire_get_key_length(ctx->keyType)));
PrintAndLogEx(INFO, " IV [%d]: %s",
desfire_get_key_block_length(ctx->keyType), desfire_get_key_block_length(ctx->keyType),
sprint_hex(ctx->sessionKeyEnc, desfire_get_key_block_length(ctx->keyType))); sprint_hex(ctx->IV, desfire_get_key_block_length(ctx->keyType)));
} }
} }