Re: Debit card example error


[ Follow Ups ] [ BasicCard User Forum ]

Posted by zeitcontrol (80.130.212.49) on November 11, 2004 at 05:57:43:

In Reply to: Debit card example error posted by aaron on November 10, 2004 at 23:44:07:

Hello Aaron,

the mistake is ours not yours. The example is just not prepared to be used with a Professional BasicCard. Please make following change to class module UserFunctions (DebitFunctions.cls) of debit example source code. Change DES_Enc as follows:
--------
Public Function DES_Enc(DesKey() As Byte, _
nr As Integer)
BasicCard.SetKey(nr) = DesKey
DES_Enc = BasicCard.StartEncryption _
(&H21, nr, RANDOM)
If BasicCard.SW1SW2 = _
BASICCARDSW1SW2.UnknownAlgorithm Then
DES_Enc = BasicCard.StartEncryption _
(&H23, nr, RANDOM)
End If
Err = BasicCard.LastErr
SW1SW2 = BasicCard.SW1SW2
End Function
------

Michael Petig
ZeitControl cardsystems GmbH



Follow Ups:


[ Follow Ups ] [ BasicCard User Forum ]