TABLE OF CONTENTS

 

[Modules] S9

NAME

   SpringCardS9API :: S9 Card entry functions

COPYRIGHT

DESCRIPTION

   Implementation of S9 entry functions to read or write the card

[Functions] SCardS9PSCVerification

NAME

   SCardS9PSCVerification

DESCRIPTION

   S9 verification function of the Programmable Security Code (PSC) 

INPUTS

   SCARDHANDLE hCard  : handle of the card
   BYTE code2         : byte 2 of Programmable Security Code
   BYTE code1         : byte 1 of Programmable Security Code
   BYTE status[2]     : 2-byte buffer to receive status code

RETURNS

   SCARD_S_SUCCESS     : PSC verification succeeded
   Other code if internal or communication error has occured.  

NOTES

   This function must be used with a S9 card containing a Programmable Security Code.
   For more information, read the datasheet of the S9 card.

[Functions] SCardS9ReadDataArea

NAME

   SCardS9ReadDataArea

DESCRIPTION

   S9 read main memory function

INPUTS

   SCARDHANDLE hCard : handle of the card
   BYTE *recv_data   : data received
   WORD addr         : first address to read
   BYTE recv_len     : length of data to read in byte
   BYTE status[2]    : 2-byte buffer to receive status code

RETURNS

   SCARD_S_SUCCESS   : success, card read
   Other code if internal or communication error has occured.  

NOTES

   Maximun length of data to read is 128 bytes

SEE ALSO

   SCardS9ReadProtectionArea
   SCardS9ReadSecurityArea

[Functions] SCardS9ReadProtectionArea

NAME

   SCardS9ReadProtectionArea

DESCRIPTION

   S9 read protection memory function

INPUTS

   SCARDHANDLE hCard  : handle of the card
   BYTE recv_data[32] : 32-byte buffer to receive protection data
   WORD addr          : first address to read
   BYTE status[2]     : 2-byte buffer to receive status code

RETURNS

   SCARD_S_SUCCESS    : success, protection memory read
   Other code if internal or communication error has occured.  

NOTES

   This function must be used with a S9 card containing a protection memory.
   For more information, read the datasheet of the S9 card.

SEE ALSO

   SCardS9ReadDataArea
   SCardS9ReadSecurityArea

[Functions] SCardS9ReadSecurityArea

NAME

   SCardS9ReadSecurityArea

DESCRIPTION

   S9 read security memory function

INPUTS

   SCARDHANDLE hCard : handle of the card
   BYTE recv_data[3] : 3-byte buffer to receive security data
   BYTE status[2]    : 2-byte buffer to receive status code

RETURNS

   SCARD_S_SUCCESS    : success, security memory read
   Other code if internal or communication error has occured.  

NOTES

   This function must be used with a S9 card containing a security memory.
   For more information, read the datasheet of the S9 card.

SEE ALSO

   SCardS9ReadDataArea
   SCardS9ReadProtectionArea

[Functions] SCardS9UpdateSecurityArea

NAME

   SCardS9UpdateSecurityArea

DESCRIPTION

   S9 update security memory function

INPUTS

   SCARDHANDLE hCard : handle of the card
   BYTE *update_data : data to update
   WORD addr         : first address to update
   BYTE update_len   : length of data to update
   BYTE status[2]    : 2-byte buffer to receive status code

RETURNS

   SCARD_S_SUCCESS   : success, data updated
   Other code if internal or communication error has occured.  

NOTES

   This function must be used with a S9 card containing a security memory.
   This function will only be executed if a PSC has been successfully verified before.
   For more information, read the datasheet of the S9 card.

SEE ALSO

   SCardS9WriteDataArea
   SCardS9WriteProtectionArea

[Functions] SCardS9WriteDataArea

NAME

   SCardS9WriteDataArea

DESCRIPTION

   S9 write data memory function

INPUTS

   SCARDHANDLE hCard : handle of the card
   BYTE *write_data  : data to write
   WORD addr         : first address to write
   BYTE write_len    : length of data to write
   BYTE status[2]    : 2-byte buffer to receive status code

RETURNS

   SCARD_S_SUCCESS   : success, data written
   Other code if internal or communication error has occured.  

NOTES

   Maximun length of data to write is 128 bytes.
   If the S9 card has a PSC, this function will only be executed if a PSC has been successfully verified before.
   For more information, read the datasheet of the S9 card.

SEE ALSO

   SCardS9WriteProtectionArea
   SCardS9UpdateSecurityArea

[Functions] SCardS9WriteProtectionArea

NAME

   SCardS9WriteProtectionArea

DESCRIPTION

   S9 write protection memory function

WARNING

   The protection bytes are irreversible byte-wise.

INPUTS

   SCARDHANDLE hCard : handle of the card
   BYTE *write_data  : data to write
   WORD addr         : first address to write
   BYTE write_len    : length of data to write
   BYTE status[2]    : 2-byte buffer to receive status code

RETURNS

   SCARD_S_SUCCESS   : success, data written
   Other code if internal or communication error has occured.  

NOTES

   This function must be used with a S9 card containing a protection memory.
   This function will only be executed if a PSC has been successfully verified before.
   For more information, read the datasheet of the S9 card.

SEE ALSO

   SCardS9WriteDataArea
   SCardS9UpdateSecurityArea

Generated from scard_s9_entry.c on Tue Mar 31 12:14:50 2009