Subversion Repositories Kolibri OS

Rev

Rev 6461 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6461 Rev 6465
Line 14... Line 14...
14
;
14
;
15
;    You should have received a copy of the GNU General Public License
15
;    You should have received a copy of the GNU General Public License
16
;    along with this program.  If not, see .
16
;    along with this program.  If not, see .
Line 17... Line -...
17
 
-
 
18
 
-
 
19
SHA224256_BLOCK_SIZE = 64
-
 
20
SHA224256_INIT_SIZE  = 32
-
 
21
SHA224_HASH_SIZE     = 28
-
 
22
SHA256_HASH_SIZE     = 32
-
 
23
SHA224256_ALIGN      = 4
-
 
24
SHA224256_ALIGN_MASK = SHA224256_ALIGN - 1
-
 
25
 
-
 
26
struct ctx_sha224256
-
 
27
        hash            rb SHA224256_INIT_SIZE
-
 
28
        block           rb SHA224256_BLOCK_SIZE
-
 
29
        index           rd 1
-
 
30
        msglen_0        rd 1
-
 
31
        msglen_1        rd 1
-
 
32
ends
-
 
33
 
17
 
34
 
18
 
35
macro sha224256._.chn x, y, z
19
macro sha224256._.chn x, y, z
36
{
20
{
37
        mov     eax, [y]
21
        mov     eax, [y]
Line 267... Line 251...
267
        add     [edi + 0x1c], eax
251
        add     [edi + 0x1c], eax
Line 268... Line 252...
268
 
252
 
269
        ret
253
        ret
Line 270... Line -...
270
endp
-
 
-
 
254
endp
271
 
255
 
272
 
256
sha256.update = sha224.update
273
proc sha224256.update _ctx, _msg, _size
257
proc sha224.update _ctx, _msg, _size
274
        mov     ebx, [_ctx]
258
        mov     ebx, [_ctx]
275
        mov     ecx, [_size]
259
        mov     ecx, [_size]
Line 324... Line 308...
324
 
308
 
325
        ret
309
        ret
Line -... Line 310...
-
 
310
endp
326
endp
311
 
327
 
312
 
328
 
313
sha256.final = sha224.final
329
proc sha224256.final _ctx
314
proc sha224.final _ctx
330
        mov     ebx, [_ctx]
315
        mov     ebx, [_ctx]
331
        lea     edi, [ebx + ctx_sha224256.block]
316
        lea     edi, [ebx + ctx_sha224256.block]