Download
plus
/MD5
/MD5.p
(View History)
mrw Initial commit. | Latest amendment: 1 on 2024-10-15 |
1 | {} |
2 | { File: MD5.p } |
3 | {} |
4 | { © 2024 mrw <plus@m0001a.org> } |
5 | {} |
6 | { Use this with MD5.lib for MD5 digests } |
7 | unit MD5Lib; |
8 | |
9 | interface |
10 | |
11 | { An ongoing MD5 calculation. All fields are private. } |
12 | type |
13 | MD5Ctx = record |
14 | state: array[0..3] of LongInt; |
15 | count: array[0..1] of LongInt; |
16 | buffer: packed array[0..63] of byte; |
17 | end; |
18 | |
19 | { Call this exactly once, and only when using THINK Pascal < 2! } |
20 | procedure InitLibP; |
21 | { Initialize an MD5 context } |
22 | procedure MD5InitP (var ctx: MD5Ctx); |
23 | { Update an MD5 context with the given input } |
24 | procedure MD5UpdateP (var ctx: MD5Ctx; input: Str255); |
25 | { Retrieve the digest from the context and clear its contents } |
26 | procedure MD5FinalP (var digest: Str255; var ctx: MD5Ctx); |
27 | |
28 | implementation |
29 | { Implementation in MD5.lib } |
30 | end. |