mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
cppcheck fixes for const
This commit is contained in:
parent
0bb9c43354
commit
e550f8ccc8
18 changed files with 62 additions and 47 deletions
|
@ -30,7 +30,7 @@
|
|||
#include "desfire_crypto.h"
|
||||
|
||||
// crypto1 helpers
|
||||
void mf_crypto1_decryptEx(struct Crypto1State *pcs, uint8_t *data_in, int len, uint8_t *data_out) {
|
||||
void mf_crypto1_decryptEx(struct Crypto1State *pcs, const uint8_t *data_in, int len, uint8_t *data_out) {
|
||||
if (len != 1) {
|
||||
for (int i = 0; i < len; i++)
|
||||
data_out[i] = crypto1_byte(pcs, 0x00, 0) ^ data_in[i];
|
||||
|
@ -53,7 +53,7 @@ void mf_crypto1_encrypt(struct Crypto1State *pcs, uint8_t *data, uint16_t len, u
|
|||
mf_crypto1_encryptEx(pcs, data, NULL, data, len, par);
|
||||
}
|
||||
|
||||
void mf_crypto1_encryptEx(struct Crypto1State *pcs, uint8_t *data_in, uint8_t *keystream, uint8_t *data_out, uint16_t len, uint8_t *par) {
|
||||
void mf_crypto1_encryptEx(struct Crypto1State *pcs, const uint8_t *data_in, uint8_t *keystream, uint8_t *data_out, uint16_t len, uint8_t *par) {
|
||||
int i;
|
||||
par[0] = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue