Subversion Repositories Kolibri OS

Rev

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

Rev 6465 Rev 7698
Line 1... Line 1...
1
;    libcrash -- cryptographic hash functions
1
;    libcrash -- cryptographic hash functions
2
;
2
;
3
;    Copyright (C) 2012-2013,2016 Ivan Baravy (dunkaist)
3
;    Copyright (C) 2012-2013,2016,2019 Ivan Baravy (dunkaist)
4
;
4
;
5
;    This program is free software: you can redistribute it and/or modify
5
;    This program is free software: you can redistribute it and/or modify
6
;    it under the terms of the GNU General Public License as published by
6
;    it under the terms of the GNU General Public License as published by
7
;    the Free Software Foundation, either version 3 of the License, or
7
;    the Free Software Foundation, either version 3 of the License, or
8
;    (at your option) any later version.
8
;    (at your option) any later version.
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 -... Line 17...
-
 
17
 
-
 
18
 
-
 
19
MD4_HASH_SIZE  = 16
-
 
20
MD4_BLOCK_SIZE = 64
-
 
21
 
-
 
22
MD4_ALIGN      = 4
-
 
23
MD4_ALIGN_MASK = MD4_ALIGN - 1
-
 
24
 
-
 
25
struct ctx_md4
-
 
26
        hash            rb MD4_HASH_SIZE
-
 
27
        block           rb MD4_BLOCK_SIZE
-
 
28
        index           rd 1
-
 
29
        msglen_0        rd 1
-
 
30
        msglen_1        rd 1
-
 
31
ends
-
 
32
 
-
 
33
if defined sizeof.crash_ctx
-
 
34
  assert sizeof.crash_ctx >= sizeof.ctx_md4
17
 
35
end if
18
 
36
 
19
macro md4._.f b, c, d
37
macro md4._.f b, c, d
20
{
38
{
21
        mov     eax, c
39
        mov     eax, c
Line 229... Line 247...
229
 
247
 
230
        ret
248
        ret
Line -... Line 249...
-
 
249
endp
231
endp
250
 
-
 
251
 
-
 
252
proc md4.oneshot _ctx, _data, _len
-
 
253
	stdcall	md4.init, [_ctx]
-
 
254
	stdcall	md4.update, [_ctx], [_data], [_len]
Line 232... Line -...
232
 
-
 
Line -... Line 255...
-
 
255
	stdcall	md4.final, [_ctx]
-
 
256
	ret
-
 
257
endp
-
 
258