MD5/Implementation: Difference between revisions

Content added Content deleted
Line 1,607: Line 1,607:
.
.
.
.
call md5init
md5init
#
#
proc md5 inp$ . s$ .
proc md5 inp$ . s$ .
Line 1,625: Line 1,625:
for i = 1 to len inp$
for i = 1 to len inp$
b = strcode substr inp$ i 1
b = strcode substr inp$ i 1
call addinp
addinp
.
.
b = 0x80
b = 0x80
call addinp
addinp
while len inp[] mod 16 <> 14 or inp4 <> 1
while len inp[] mod 16 <> 14 or inp4 <> 1
b = 0
b = 0
call addinp
addinp
.
.
h = len inp$ * 8
h = len inp$ * 8
for i = 1 to 4
for i = 1 to 4
b = h mod 0x100
b = h mod 0x100
call addinp
addinp
h = h div 0x100
h = h div 0x100
.
.
Line 1,695: Line 1,695:
s$ = input
s$ = input
until error = 1
until error = 1
call md5 s$ h$
md5 s$ h$
print h$
print h$
.
.