;УPIN޸PINPINPINPINװȷ
reset
00A404000F 7378312E73682EC9E7BBE1B1A3D5CF
compsta 90 00
<--! %stestPin = 888888

;У PIN
00 20 00 00 03 %spin
RECCMPTXT 90 00

;PIN
00 20 00 00 04 01 02 03 04
reccmptxt 63 C2
00 20 00 00 04 01 02 03 04
reccmptxt 63 c1
00 20 00 00 04 01 02 03 04
reccmptxt 63 c0
00 20 00 00 04 01 02 03 04
reccmptxt 69 83

;;;;;;;;PINҪPUK֤Ȩ
<--! %origin=1122334455667788
00 84 00 00 08
<--! %rand=@strmid(%resp,0,16)
00 82 00 06 10 @sbjbdata(%sPUKDDF1,%origin,%rand) %origin
reccmptxt 90 00

;PIN
00 84 00 00 08
<--! %rand=@strmidh(%resp,0,8)
<--! %rcmd=84 24 00 00 04 
sendtxt %rcmd @sbmac(%sSTKDDF1,%rcmd,%rand)
reccmptxt 90 00

00 20 00 00 03 %spin
RECCMPTXT 90 00

;һַʽ ޸ PIN
00 84 00 00 08
<--! %rand=@strmidh(%resp,0,8)
<--! %pindes=@sbencrdata(%sSTKDDF1,%stestPin,%rand)
<--! %rcmd=84 24 00 01 0C + %pindes
<--! %smac=@sbmac(%sSTKDDF1,%rcmd,%rand)
sendtxt %rcmd %smac
reccmptxt 90 00

00 20 00 00 03 %stestPin
RECCMPTXT 90 00

;ڶַʽ ޸ PIN  ;޸Ļ
80 5e 01 00 07 %stestPin ff %spin
RECCMPTXT 90 00

00 20 00 00 03 %spin
RECCMPTXT 90 00

;PINװ ֻPBOCӦ
;<--! %dprk=00000000000000000000000000000000
;<--! %key=@xor(0000000000000000,0000000000000000)
;<--! %NewPIN=951246
;<--! %mac=@xortac(%dprk,%NewPIN)
;80 5E 00 00 07 %NewPIN %mac
;compsta 9000


