 |
MIKAI
Library to modify content of a Mykey
|
Go to the documentation of this file.
28 #define SRIX_BLOCK_LENGTH 4
29 #define SRIX_UID_LENGTH 8
30 #define SRIX4K_BLOCKS 128
31 #define SRIX4K_BYTES 512
MIKAI_EXPORT bool MyKeyCheckLockID(MyKey *key)
Return true if MyKey has lock id and checksum of credit is wrong.
MIKAI_EXPORT void MyKeyReset(MyKey *key)
Reset a MyKey to associate it with another vendor.
MIKAI_EXPORT void MyKeyExportMemory(MyKey *key, uint32_t dump[const 128], uint64_t *uid)
Export SRIX data to specified memory locations.
const MIKAI_EXPORT char * MikaiGetLatestError(MyKey *key)
Get a text description of latest error occured and reset it.
MIKAI_EXPORT uint16_t MyKeyGetCurrentCredit(MyKey *key)
Extract current credit from block 21.
Struct that represents a MyKey.
MIKAI_EXPORT int MyKeyAddCents(MyKey *key, uint16_t cents, uint8_t day, uint8_t month, uint8_t year)
Add N cents to MyKey actual credit.
MIKAI_EXPORT void MikaiDelete(MyKey *key)
Delete a MyKey.
MIKAI_EXPORT uint32_t MyKeyGetEncryptionKey(MyKey *key)
Get MyKey encryption key.
const MIKAI_EXPORT char * MikaiVersion()
Get current version of mikai as string.
MIKAI_EXPORT MyKey * MikaiNew()
Create a new MyKey instance.
MIKAI_EXPORT int MyKeySetCents(MyKey *key, uint16_t cents, uint8_t day, uint8_t month, uint8_t year)
Reset credit history and charge N cents.
MIKAI_EXPORT void MyKeyImportVendor(MyKey *key, uint32_t vendor)
Import vendor code and recalculate encryption key.
const MIKAI_EXPORT char * MikaiInit(MyKey **target, uint32_t dump[const 128], uint64_t selection)
Initialize a MyKey.
MIKAI_EXPORT uint32_t MyKeyGetBlock(MyKey *key, uint8_t blockNum)
Get the value of a specific block.
MIKAI_EXPORT bool MyKeyIsReset(MyKey *key)
Check if a MyKey is reset (if it hasn't an associated vendor code).
MIKAI_EXPORT int MyKeyExportVendor(MyKey *key, uint32_t *vendor)
Decrypt vendor code and save it to vendor pointer.
MIKAI_EXPORT void MyKeyModifyBlock(MyKey *key, uint32_t block, uint8_t blockNum)
Modify a MyKey block manually.