mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-22 22:33:48 -07:00
encode fix
This commit is contained in:
parent
8d84e96716
commit
fd5afbdfac
1 changed files with 1 additions and 1 deletions
|
@ -254,7 +254,7 @@ static void DesfireSecureChannelEncodeEV2(DesfireContext *ctx, uint8_t cmd, uint
|
||||||
|
|
||||||
if (ctx->commMode == DCMPlain || ctx->commMode == DCMMACed || (ctx->commMode == DCMEncrypted && srcdatalen <= hdrlen)) {
|
if (ctx->commMode == DCMPlain || ctx->commMode == DCMMACed || (ctx->commMode == DCMEncrypted && srcdatalen <= hdrlen)) {
|
||||||
|
|
||||||
if (srcdatalen > hdrlen && ctx->commMode == DCMMACed) {
|
if (ctx->commMode == DCMMACed || ctx->commMode == DCMEncrypted) {
|
||||||
uint8_t cmac[DESFIRE_MAX_CRYPTO_BLOCK_SIZE] = {0};
|
uint8_t cmac[DESFIRE_MAX_CRYPTO_BLOCK_SIZE] = {0};
|
||||||
DesfireEV2CalcCMAC(ctx, cmd, data, srcdatalen, cmac);
|
DesfireEV2CalcCMAC(ctx, cmd, data, srcdatalen, cmac);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue