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
MD5_HASH_SIZE  = 16
-
 
20
MD5_BLOCK_SIZE = 64
-
 
21
 
-
 
22
MD5_ALIGN      = 4
-
 
23
MD5_ALIGN_MASK = MD5_ALIGN - 1
-
 
24
 
-
 
25
struct ctx_md5
-
 
26
        hash            rb MD5_HASH_SIZE
-
 
27
        block           rb MD5_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_md5
17
 
35
end if
18
 
36
 
19
macro md5._.f b, c, d
37
macro md5._.f b, c, d
20
{
38
{
21
        push    c
39
        push    c
Line 257... Line 275...
257
 
275
 
258
        ret
276
        ret
Line -... Line 277...
-
 
277
endp
259
endp
278
 
-
 
279
 
-
 
280
proc md5.oneshot _ctx, _data, _len
-
 
281
	stdcall	md5.init, [_ctx]
-
 
282
	stdcall	md5.update, [_ctx], [_data], [_len]
Line 260... Line -...
260
 
-
 
Line -... Line 283...
-
 
283
	stdcall	md5.final, [_ctx]
-
 
284
	ret
-
 
285
endp
-
 
286