mirror of https://github.com/hashcat/hashcat.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
587 B
25 lines
587 B
![]()
6 years ago
|
DECLSPEC u32 u8add (const u32 a, const u32 b)
|
||
|
{
|
||
|
const u32 a1 = (a >> 0) & 0xff;
|
||
|
const u32 a2 = (a >> 8) & 0xff;
|
||
|
const u32 a3 = (a >> 16) & 0xff;
|
||
|
const u32 a4 = (a >> 24) & 0xff;
|
||
|
|
||
|
const u32 b1 = (b >> 0) & 0xff;
|
||
|
const u32 b2 = (b >> 8) & 0xff;
|
||
|
const u32 b3 = (b >> 16) & 0xff;
|
||
|
const u32 b4 = (b >> 24) & 0xff;
|
||
|
|
||
|
const u32 r1 = (a1 + b1) & 0xff;
|
||
|
const u32 r2 = (a2 + b2) & 0xff;
|
||
|
const u32 r3 = (a3 + b3) & 0xff;
|
||
|
const u32 r4 = (a4 + b4) & 0xff;
|
||
|
|
||
|
const u32 r = r1 << 0
|
||
|
| r2 << 8
|
||
|
| r3 << 16
|
||
|
| r4 << 24;
|
||
|
|
||
|
return r;
|
||
|
}
|