Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int write_fprint (char *file)
- {
- char status;
- char *buffer;
- long lengthfp;
- uchar buffer_fplength[16];
- lengthfp = getbuffl(file, &buffer);
- buffer_fplength[0] = (lengthfp>>8) & 0x00FF;
- buffer_fplength[1] = (lengthfp) & 0x00FF;
- //numblocks = ceil((float)lengthfp/16);
- status = MFRC522_Auth(AUTHENTICATION_TYPE, BLOCK_CFG, pkey, serNum);
- //buffer_fplength[0] = numblocks;
- status=MFRC522_Write(BLOCK_CFG, buffer_fplength);
- if (status == MI_OK)
- {
- status = writefield(lengthfp, BLOCK_FPRINT, (uchar*)buffer);
- }
- free (buffer);
- if (status != MI_OK)
- {
- //status = MI_ERR;
- //exchange_keys();
- DPRINTF("Error - write fprint: %d\n", status);
- return status;
- }
- printf("Minutiae written with success\n");
- return status;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement