NAME
MifPlusAPI :: Virtual Card
COPYRIGHT
(c) 2011 SpringCard - www.springcard.com
DESCRIPTION
Implementation of the Mifare Plus Virtual Card functions
NAME
DeselectVirtualCard
NOTES
This command is supported both by Mifare Plus X and S at Level 3.
SYNOPSIS
[[sprox_milplus.dll]] SWORD SPROX_MifPlus_DeselectVirtualCard(void); [[sprox_milplus_ex.dll]] SWORD SPROXx_MifPlus_DeselectVirtualCard(SPROX_INSTANCE rInst); [[pcsc_mifplus.dll]] LONG SCardMifPlus_DeselectVirtualCard(SCARDHANDLE hCard);
SEE ALSO
VirtualCard SelectVirtualCard
NAME
SelectVirtualCard
NOTES
This command is supported only by Mifare Plus X at Level 3.
SYNOPSIS
[[sprox_milplus.dll]] SWORD SPROX_MifPlus_SelectVirtualCard(const BYTE picc_cap[2], const BYTE picc_uid[], BYTE picc_uid_len, const BYTE select_mac_key[16]); [[sprox_milplus_ex.dll]] SWORD SPROXx_MifPlus_SelectVirtualCard(SPROX_INSTANCE rInst, const BYTE picc_cap[2], const BYTE picc_uid[], BYTE picc_uid_len, const BYTE select_mac_key[16]); [[pcsc_mifplus.dll]] LONG SCardMifPlus_SelectVirtualCard(SCARDHANDLE hCard, const BYTE picc_cap[2], const BYTE picc_uid[], BYTE picc_uid_len, const BYTE select_mac_key[16]);
INPUTS
const BYTE picc_cap[2] : the PICCcap1 field as returned by the card (2 bytes) const BYTE picc_uid[] : the card's UID (4 or 7 bytes) BYTE picc_uid_len : the length of the UID const BYTE select_mac_key[16] : the VC Select MAC Key
SEE ALSO
VirtualCard DeselectVirtualCard VirtualCardSupportLast VirtualCardSupportCheck
NAME
VirtualCard
NOTES
This function implements VirtualCardSupportLast and VirtualCardSupportCheck in a single call. If more than one Installation Identifier is supported by the application, use VirtualCardEx (Mifare Plus X only).
SYNOPSIS
[[sprox_milplus.dll]] SWORD SPROX_MifPlus_VirtualCard(const BYTE install_id[16], const BYTE polling_enc_key[16], const BYTE polling_mac_key[16], const BYTE pcd_cap[], BYTE pcd_cap_len, BYTE *picc_info, BYTE picc_cap[2], BYTE picc_uid[], BYTE *picc_uid_len); [[sprox_milplus_ex.dll]] SWORD SPROXx_MifPlus_VirtualCard(SPROX_INSTANCE rInst, const BYTE install_id[16], const BYTE polling_enc_key[16], const BYTE polling_mac_key[16], const BYTE pcd_cap[], BYTE pcd_cap_len, BYTE *picc_info, BYTE picc_cap[2], BYTE picc_uid[], BYTE *picc_uid_len); [[pcsc_mifplus.dll]] LONG SCardMifPlus_VirtualCard(SCARDHANDLE hCard, const BYTE install_id[16], const BYTE polling_enc_key[16], const BYTE polling_mac_key[16], const BYTE pcd_cap[], BYTE pcd_cap_len, BYTE *picc_info, BYTE picc_cap[2], BYTE picc_uid[], BYTE *picc_uid_len);
INPUTS
const BYTE install_id[16] : Installation Identifier const BYTE polling_enc_key[16] : the VC Polling Encryption Key const BYTE polling_mac_key[16] : the VC Polling MAC Key const BYTE pcd_cap[] : PCDCap1 field (to be defined by the application, or NULL) BYTE pcd_cap_len : size of pcd_cap (0 to 6) BYTE *picc_info : upon success, the Info Byte returned by the card BYTE picc_cap[2] : upon success, the PICCcap1 field returned by the card (2 bytes) BYTE picc_uid[] : upon success, the card's UID (4 or 7 bytes) BYTE *picc_uid_len : upon success, the actual length of the UID
SEE ALSO
VirtualCardEx VirtualCardSupportCheck
NAME
VirtualCardEx
NOTES
This function implements VirtualCardSupport, VirtualCardSupportLast, VirtualCardSupportCheck and SelectVirtualCard in a single call. If is supported only by Mifare Plus X.
SYNOPSIS
[[sprox_milplus.dll]] SWORD SPROX_MifPlus_VirtualCardEx(const BYTE install_id[], const BYTE polling_enc_keys[], const BYTE polling_mac_keys[], const BYTE select_mac_keys[], BYTE install_count, const BYTE pcd_cap[], BYTE pcd_cap_len, BYTE *picc_info, BYTE picc_cap[2], BYTE picc_uid[], BYTE *picc_uid_len, BYTE *install_idx); [[sprox_milplus_ex.dll]] SWORD SPROXx_MifPlus_VirtualCardEx(SPROX_INSTANCE rInst, const BYTE install_id[], const BYTE polling_enc_keys[], const BYTE polling_mac_keys[], const BYTE select_mac_keys[], BYTE install_count, const BYTE pcd_cap[], BYTE pcd_cap_len, BYTE *picc_info, BYTE picc_cap[2], BYTE picc_uid[], BYTE *picc_uid_len, BYTE *install_idx); [[pcsc_mifplus.dll]] LONG SCardMifPlus_VirtualCardEx(SCARDHANDLE hCard, const BYTE install_id[], const BYTE polling_enc_keys[], const BYTE polling_mac_keys[], const BYTE select_mac_keys[], BYTE install_count, const BYTE pcd_cap[], BYTE pcd_cap_len, BYTE *picc_info, BYTE picc_cap[2], BYTE picc_uid[], BYTE *picc_uid_len, BYTE *install_idx);
INPUTS
const BYTE install_ids[] : list of Installation Identifiers (16 * install_count) const BYTE polling_enc_keys[] : list of VC Polling Encryption Keys (16 * install_count) const BYTE polling_mac_keys[] : list of VC Polling MAC Keys (16 * install_count) const BYTE select_mac_keys[] : list of VC Select MAC Keys (16 * install_count) const BYTE pcd_cap[] : PCDCap1 field (to be defined by the application, or NULL) BYTE pcd_cap_len : size of pcd_cap (0 to 6) BYTE *picc_info : upon success, the Info Byte returned by the card BYTE picc_cap[2] : upon success, the PICCcap1 field returned by the card (2 bytes) BYTE picc_uid[] : upon success, the card's UID (4 or 7 bytes) BYTE *picc_uid_len : upon success, the actual length of the UID BYTE *install_idx : upon success, the index of the selected Installation
SEE ALSO
VirtualCard
NAME
VirtualCardSupport
NOTES
This command is supported only by Mifare Plus X at Level 3.
SYNOPSIS
[[sprox_milplus.dll]] SWORD SPROX_MifPlus_VirtualCardSupport(const BYTE install_id[16]); [[sprox_milplus_ex.dll]] SWORD SPROXx_MifPlus_VirtualCardSupport(SPROX_INSTANCE rInst, const BYTE install_id[16]); [[pcsc_mifplus.dll]] LONG SCardMifPlus_VirtualCardSupport(SCARDHANDLE hCard, const BYTE install_id[16]);
INPUTS
const BYTE install_id[16] : Installation Identifier
SEE ALSO
VirtualCard VirtualCardSupportLast
NAME
VirtualCardSupportCheck
NOTES
This is not an actual command to the card, but a way for the application to decode (and validate) the card's answer to VirtualCardSupportLast.
SYNOPSIS
[[sprox_milplus.dll]] SWORD SPROX_MifPlus_VirtualCardSupportCheck(const BYTE pcd_rnd[12], const BYTE pcd_cap[], BYTE pcd_cap_len, const BYTE picc_data[16], const BYTE picc_mac[8], BYTE *picc_info, BYTE picc_cap[2], BYTE picc_uid[], BYTE *picc_uid_len, const BYTE polling_enc_key[16], const BYTE polling_mac_key[16]); [[sprox_milplus_ex.dll]] SWORD SPROXx_MifPlus_VirtualCardSupportCheck(SPROX_INSTANCE rInst, const BYTE pcd_rnd[12], const BYTE pcd_cap[], BYTE pcd_cap_len, const BYTE picc_data[16], const BYTE picc_mac[8], BYTE *picc_info, BYTE picc_cap[2], BYTE picc_uid[], BYTE *picc_uid_len, const BYTE polling_enc_key[16], const BYTE polling_mac_key[16]); [[pcsc_mifplus.dll]] LONG SCardMifPlus_VirtualCardSupportCheck(SCARDHANDLE hCard, const BYTE pcd_rnd[12], const BYTE pcd_cap[], BYTE pcd_cap_len, const BYTE picc_data[16], const BYTE picc_mac[8], BYTE *picc_info, BYTE picc_cap[2], BYTE picc_uid[], BYTE *picc_uid_len, const BYTE polling_enc_key[16], const BYTE polling_mac_key[16]);
INPUTS
const BYTE pcd_rnd[12] : RND of the PCD (generated by the caller) const BYTE pcd_cap[] : PCDCap1 field (to be defined by the application, or NULL) BYTE pcd_cap_len : size of pcd_cap (0 to 6) const BYTE picc_data[16] : PICC's answer (data part) const BYTE picc_mac[8]) : PICC's answer (MAC part) BYTE *picc_info : upon success, the Info Byte returned by the card BYTE picc_cap[2] : upon success, the PICCcap1 field returned by the card (2 bytes) BYTE picc_uid[] : upon success, the card's UID (4 or 7 bytes) BYTE *picc_uid_len : upon success, the actual length of the UID const BYTE polling_enc_key[16] : the VC Polling Encryption Key const BYTE polling_mac_key[16] : the VC Polling MAC Key
SEE ALSO
VirtualCard SelectVirtualCard
NAME
VirtualCardSupportLast
NOTES
This command is supported both by Mifare Plus X and S at Level 3.
SYNOPSIS
[[sprox_milplus.dll]] SWORD SPROX_MifPlus_VirtualCardSupportLast(const BYTE install_id[16], const BYTE pcd_rnd[12], const BYTE pcd_cap[], BYTE pcd_cap_len, BYTE picc_data[16], BYTE picc_mac[8]); [[sprox_milplus_ex.dll]] SWORD SPROXx_MifPlus_VirtualCardSupportLast(SPROX_INSTANCE rInst, const BYTE install_id[16], const BYTE pcd_rnd[12], const BYTE pcd_cap[], BYTE pcd_cap_len, BYTE picc_data[16], BYTE picc_mac[8]); [[pcsc_mifplus.dll]] LONG SCardMifPlus_VirtualCardSupportLast(SCARDHANDLE hCard, const BYTE install_id[16], const BYTE pcd_rnd[12], const BYTE pcd_cap[], BYTE pcd_cap_len, BYTE picc_data[16], BYTE picc_mac[8]);
INPUTS
const BYTE install_id[16] : Installation Identifier const BYTE pcd_rnd[12] : RND of the PCD (generated by the caller) const BYTE pcd_cap[] : PCDCap1 field (to be defined by the application, or NULL) BYTE pcd_cap_len : size of pcd_cap (0 to 6) BYTE picc_data[16] : buffer to receive the PICC's answer (data part) BYTE picc_mac[8]) : buffer to receive the PICC's answer (MAC part)
SEE ALSO
VirtualCard VirtualCardSupportCheck