3 ; Copyright 2000-2004 John Coffman
4 ; Copyright 2009-2011 Joachim Wiedorn
7 ; Licensed under the terms contained in the file 'COPYING'
8 ; in the source directory.
12 ;;; group dgroup _data
14 ;;; segment _data public align=16 class=data
37 ;;; segment _text public align=16 class=code
51 mov di,#shs_digest ;##
55 mov Dshs,dword (di+12)
56 mov Eshs,dword (di+16)
68 add temp_shs,#0x5a827999 ;##
80 add temp_shs,#0x6ed9eba1
96 sub temp_shs,#0x70e44324
108 sub temp_shs,#0x359d3e2a
115 mov bx,#shs_digest ;##
117 add dword (bx+4),Bshs
118 add dword (bx+8),Cshs
119 add dword (bx+12),Dshs
120 add dword (bx+16),Eshs
139 mov Ashs,dword Wshs(bx)
145 mov Ashs,dword Wshs(bx)
148 xor Ashs,dword Wshs(bx)
151 xor Ashs,dword Wshs(bx)
154 xor Ashs,dword Wshs(bx)
156 mov dword Wshs(bx),Ashs
188 ; global _shsInit, _shsUpdate, _shsFinal
195 mov di,#shs_digest ;##
196 mov dword (di),#0x67452301 ;##
197 mov dword (di+4),#0xefcdab89
198 mov dword (di+8),#0x98badcfe
199 mov dword (di+12),#0x10325476
200 mov dword (di+16),#0xc3d2e1f0 ;##
202 mov dword (di+20),eax
203 mov dword (di+24),eax
227 ; remain = shsInfo.countLo & (SHS_BLOCKSIZE-1);
231 movzx eax,word (bp+6) ;count
233 adc dword [shs_count+4],#0 ;##
235 mov si,(bp+4) ;buffer
239 sub cx,di ;CX = SHS_BLOCKSIZE-remain
240 cmp ax,cx ; count >= SHS_BLOCKSIZE-remain
244 sub ax,cx ; count -= SHS_BLOCKSIZE-remain
286 mov byte Wshs(di),#0x80 ;##
293 sub cx,di ;SHS_BLOCKSIZE - count
314 mov ebx,[shs_count+4]
334 #endif /* BSS_DATA */