#include <stdint.h>
#include <string.h>
#include <mikai/mikai.h>
#include <mikai-internal.h>
#include <mikai-error.h>
#include <srix.h>
Go to the source code of this file.
|
void | calculateEncryptionKey (MyKey key[static 1]) |
| Calculate the encryption key and save the result in mikai struct. More...
|
|
uint32_t | MyKeyGetEncryptionKey (MyKey key[static 1]) |
|
bool | MyKeyIsReset (MyKey *key) |
| Check if a MyKey is reset (if it hasn't an associated vendor code). More...
|
|
bool | MyKeyCheckLockID (MyKey key[static 1]) |
|
uint32_t | MyKeyGetBlock (MyKey key[static 1], uint8_t blockNum) |
|
void | MyKeyModifyBlock (MyKey key[static 1], uint32_t block, uint8_t blockNum) |
|
void | MyKeyImportVendor (MyKey key[static 1], const uint32_t vendor) |
|
int | MyKeyExportVendor (MyKey key[static 1], uint32_t vendor[static 1]) |
|
void | MyKeyExportMemory (MyKey key[static 1], uint32_t dump[const SRIX4K_BLOCKS], uint64_t *uid) |
|
void | MyKeyReset (MyKey key[static 1]) |
|
uint16_t | MyKeyGetCurrentCredit (MyKey key[static 1]) |
|
int | MyKeyAddCents (MyKey key[static 1], uint16_t cents, uint8_t day, uint8_t month, uint8_t year) |
|
int | MyKeySetCents (MyKey key[static 1], uint16_t cents, uint8_t day, uint8_t month, uint8_t year) |
|
◆ calculateEncryptionKey()
void calculateEncryptionKey |
( |
MyKey |
key[static 1] | ) |
|
Calculate the encryption key and save the result in mikai struct.
- Parameters
-
key | pointer to mikai data struct |
Definition at line 104 of file mykey.c.
◆ MyKeyAddCents()
int MyKeyAddCents |
( |
MyKey |
key[static 1], |
|
|
uint16_t |
cents, |
|
|
uint8_t |
day, |
|
|
uint8_t |
month, |
|
|
uint8_t |
year |
|
) |
| |
◆ MyKeyCheckLockID()
bool MyKeyCheckLockID |
( |
MyKey |
key[static 1] | ) |
|
◆ MyKeyExportMemory()
void MyKeyExportMemory |
( |
MyKey |
key[static 1], |
|
|
uint32_t |
dump[const SRIX4K_BLOCKS], |
|
|
uint64_t * |
uid |
|
) |
| |
◆ MyKeyExportVendor()
int MyKeyExportVendor |
( |
MyKey |
key[static 1], |
|
|
uint32_t |
vendor[static 1] |
|
) |
| |
◆ MyKeyGetBlock()
uint32_t MyKeyGetBlock |
( |
MyKey |
key[static 1], |
|
|
uint8_t |
blockNum |
|
) |
| |
◆ MyKeyGetCurrentCredit()
uint16_t MyKeyGetCurrentCredit |
( |
MyKey |
key[static 1] | ) |
|
◆ MyKeyGetEncryptionKey()
uint32_t MyKeyGetEncryptionKey |
( |
MyKey |
key[static 1] | ) |
|
◆ MyKeyImportVendor()
void MyKeyImportVendor |
( |
MyKey |
key[static 1], |
|
|
const uint32_t |
vendor |
|
) |
| |
◆ MyKeyIsReset()
bool MyKeyIsReset |
( |
MyKey * |
key | ) |
|
Check if a MyKey is reset (if it hasn't an associated vendor code).
- Parameters
-
key | pointer to MyKey struct |
- Returns
- boolean value, true = there isn't a vendor bound
Definition at line 131 of file mykey.c.
◆ MyKeyModifyBlock()
void MyKeyModifyBlock |
( |
MyKey |
key[static 1], |
|
|
uint32_t |
block, |
|
|
uint8_t |
blockNum |
|
) |
| |
◆ MyKeyReset()
void MyKeyReset |
( |
MyKey |
key[static 1] | ) |
|
◆ MyKeySetCents()
int MyKeySetCents |
( |
MyKey |
key[static 1], |
|
|
uint16_t |
cents, |
|
|
uint8_t |
day, |
|
|
uint8_t |
month, |
|
|
uint8_t |
year |
|
) |
| |