]>
cygwin.com Git - cygwin-apps/setup.git/blob - MD5++.cc
2 * Copyright (c) 2000, Red Hat, Inc.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * A copy of the GNU General Public License can be found at
12 * Written by DJ Delorie <dj@cygnus.com>
23 for (int i
=0; i
< 16; ++i
)
25 char tc
= (digest
[i
] & 0xf0) >> 4;
26 d1
[i
* 2] = tc
< 10 ? tc
+ '0' : tc
+ 'a' - 10;
27 tc
= digest
[i
] & 0x0f;
28 d1
[i
* 2 + 1] = tc
< 10 ? tc
+ '0' : tc
+ 'a' - 10;
34 md5::operator == (md5
const &rhs
) const
36 for (int i
=0; i
< 16; ++i
)
37 if (digest
[i
] != rhs
.digest
[i
])
43 md5::operator != (md5
const &rhs
) const
45 return !(*this == rhs
);
This page took 0.034727 seconds and 5 git commands to generate.