mirror of
https://github.com/ksherlock/host-modemworks.git
synced 2025-01-01 22:31:49 +00:00
final fixes for & hash val()
This commit is contained in:
parent
2076d76d14
commit
da73d4139e
12
HashKEGS.aii
12
HashKEGS.aii
@ -302,7 +302,7 @@ hash_val
|
|||||||
; str2 = plaintext
|
; str2 = plaintext
|
||||||
; returns 1 if & hash(type, salt+plaintext)=hash
|
; returns 1 if & hash(type, salt+plaintext)=hash
|
||||||
|
|
||||||
bsr break
|
;bsr break
|
||||||
|
|
||||||
; a1 used for return value (OMM_PUTWORD)
|
; a1 used for return value (OMM_PUTWORD)
|
||||||
stz a1
|
stz a1
|
||||||
@ -499,10 +499,11 @@ salt
|
|||||||
sty prmtbl+2 ; count
|
sty prmtbl+2 ; count
|
||||||
iny
|
iny
|
||||||
dex
|
dex
|
||||||
|
; bmi @bad would allow 0-length hash.
|
||||||
beq @bad
|
beq @bad
|
||||||
|
|
||||||
phx
|
|
||||||
phy
|
phy
|
||||||
|
phx
|
||||||
|
|
||||||
; hash append the salt.
|
; hash append the salt.
|
||||||
lda #MSG_USER
|
lda #MSG_USER
|
||||||
@ -537,7 +538,7 @@ str equ lowtr+1
|
|||||||
bit a2 ; hash length
|
bit a2 ; hash length
|
||||||
bmi exit
|
bmi exit
|
||||||
|
|
||||||
lda #str
|
lda str
|
||||||
sta prmtbl
|
sta prmtbl
|
||||||
stx prmtbl+2
|
stx prmtbl+2
|
||||||
; hash it
|
; hash it
|
||||||
@ -560,18 +561,19 @@ str equ lowtr+1
|
|||||||
dc.b $42, WDM_ID
|
dc.b $42, WDM_ID
|
||||||
|
|
||||||
lda prmtbl+2 ; actual size
|
lda prmtbl+2 ; actual size
|
||||||
bne exit
|
beq exit
|
||||||
cmp a2
|
cmp a2
|
||||||
bne exit
|
bne exit
|
||||||
|
|
||||||
lsr a ; / 2
|
|
||||||
tay
|
tay
|
||||||
dey
|
dey
|
||||||
|
dey
|
||||||
@loop
|
@loop
|
||||||
lda (prmtbl),y
|
lda (prmtbl),y
|
||||||
cmp (prmtbl+4),y
|
cmp (prmtbl+4),y
|
||||||
bne exit
|
bne exit
|
||||||
dey
|
dey
|
||||||
|
dey
|
||||||
bpl @loop
|
bpl @loop
|
||||||
lda #1
|
lda #1
|
||||||
sta a1
|
sta a1
|
||||||
|
Loading…
Reference in New Issue
Block a user