mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
style
This commit is contained in:
parent
0a7ebcf3e3
commit
2ad635ce57
8 changed files with 21 additions and 22 deletions
|
@ -575,7 +575,7 @@ int char2int(char c) {
|
|||
return -1; // Invalid character for hex
|
||||
}
|
||||
|
||||
// returns the number of bytes written
|
||||
// returns the number of bytes written
|
||||
int hexstr2ByteArr(const char *hexstr, unsigned char *array, size_t asize) {
|
||||
size_t n = 0;
|
||||
while (hexstr[n] != '\0') {
|
||||
|
@ -598,4 +598,4 @@ int hexstr2ByteArr(const char *hexstr, unsigned char *array, size_t asize) {
|
|||
array[i >> 1] = (high << 4) | low;
|
||||
}
|
||||
return n >> 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -556,7 +556,7 @@ int mfc_algo_bambu_one(uint8_t *uid, uint8_t sector, uint8_t keytype, uint64_t *
|
|||
const mbedtls_md_info_t *info = mbedtls_md_info_from_type(MBEDTLS_MD_SHA256);
|
||||
|
||||
if (keytype == 0) {
|
||||
mbedtls_hkdf(info, bambu_salt, sizeof(bambu_salt), uid, 4, bambu_context_a, sizeof(bambu_context_a), keys, sizeof(keys) );
|
||||
mbedtls_hkdf(info, bambu_salt, sizeof(bambu_salt), uid, 4, bambu_context_a, sizeof(bambu_context_a), keys, sizeof(keys));
|
||||
} else {
|
||||
mbedtls_hkdf(info, bambu_salt, sizeof(bambu_salt), uid, 4, bambu_context_b, sizeof(bambu_context_b), keys, sizeof(keys));
|
||||
}
|
||||
|
@ -571,7 +571,7 @@ int mfc_algo_bambu_all(uint8_t *uid, uint8_t *keys) {
|
|||
|
||||
// prepare hmac context
|
||||
const mbedtls_md_info_t *info = mbedtls_md_info_from_type(MBEDTLS_MD_SHA256);
|
||||
mbedtls_hkdf(info, bambu_salt, sizeof(bambu_salt), uid, 4, bambu_context_a, sizeof(bambu_context_a), keys, (16 * 6) );
|
||||
mbedtls_hkdf(info, bambu_salt, sizeof(bambu_salt), uid, 4, bambu_context_a, sizeof(bambu_context_a), keys, (16 * 6));
|
||||
mbedtls_hkdf(info, bambu_salt, sizeof(bambu_salt), uid, 4, bambu_context_b, sizeof(bambu_context_b), keys + (16 * 6), (16 * 6));
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue