3 Copyright 2000-2004 John Coffman.
6 Licensed under the terms contained in the file 'COPYING' in the
11 ;;; group dgroup _data
13 ;;; segment _data public align=16 class=data
36 ;;; segment _text public align=16 class=code
50 mov di,#shs_digest ;##
54 mov Dshs,dword (di+12)
55 mov Eshs,dword (di+16)
67 add temp_shs,#0x5a827999 ;##
79 add temp_shs,#0x6ed9eba1
95 sub temp_shs,#0x70e44324
107 sub temp_shs,#0x359d3e2a
114 mov bx,#shs_digest ;##
116 add dword (bx+4),Bshs
117 add dword (bx+8),Cshs
118 add dword (bx+12),Dshs
119 add dword (bx+16),Eshs
138 mov Ashs,dword Wshs(bx)
144 mov Ashs,dword Wshs(bx)
147 xor Ashs,dword Wshs(bx)
150 xor Ashs,dword Wshs(bx)
153 xor Ashs,dword Wshs(bx)
155 mov dword Wshs(bx),Ashs
187 ; global _shsInit, _shsUpdate, _shsFinal
194 mov di,#shs_digest ;##
195 mov dword (di),#0x67452301 ;##
196 mov dword (di+4),#0xefcdab89
197 mov dword (di+8),#0x98badcfe
198 mov dword (di+12),#0x10325476
199 mov dword (di+16),#0xc3d2e1f0 ;##
201 mov dword (di+20),eax
202 mov dword (di+24),eax
226 ; remain = shsInfo.countLo & (SHS_BLOCKSIZE-1);
230 movzx eax,word (bp+6) ;count
232 adc dword [shs_count+4],#0 ;##
234 mov si,(bp+4) ;buffer
238 sub cx,di ;CX = SHS_BLOCKSIZE-remain
239 cmp ax,cx ; count >= SHS_BLOCKSIZE-remain
243 sub ax,cx ; count -= SHS_BLOCKSIZE-remain
285 mov byte Wshs(di),#0x80 ;##
292 sub cx,di ;SHS_BLOCKSIZE - count
313 mov ebx,[shs_count+4]
333 #endif /* BSS_DATA */