1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-07-19 13:08:19 +00:00

fix build errors with 32700 on Metal

This commit is contained in:
Gabriele Gristina 2025-07-09 22:37:59 +02:00
parent 5ffbc5edc4
commit 3ed45d4e83
No known key found for this signature in database
GPG Key ID: 9F68B59298F311F0

View File

@ -41,7 +41,7 @@ CONSTANT_VK u32 newdes_rotor[256] =
0x3a, 0x37, 0x03, 0xf4, 0x61, 0xc5, 0xee, 0xe3, 0x76, 0x31, 0x4f, 0xe6, 0xdf, 0xa5, 0x99, 0x3b,
};
DECLSPEC void new_des (u32 *block, u32 *newdes_key)
DECLSPEC void new_des (PRIVATE_AS u32 *block, PRIVATE_AS u32 *newdes_key)
{
#define B0 (*(block+0))
#define B1 (*(block+1))
@ -71,7 +71,7 @@ DECLSPEC void new_des (u32 *block, u32 *newdes_key)
B7 = B7 ^ newdes_rotor[B3 ^ *(newdes_key++)];
}
DECLSPEC void key_expansion (const u8 *sha1sum, u32 *result)
DECLSPEC void key_expansion (PRIVATE_AS const u8 *sha1sum, PRIVATE_AS u32 *result)
{
for (int count = 0; count < 15; count++)
{
@ -143,7 +143,7 @@ KERNEL_FQ KERNEL_FA void m32700_init (KERN_ATTR_TMPS (sha1_tmp_t))
// Crate a NewDES key
u32 newdes_key32[60];
key_expansion ((const u8 *) ctx.h, newdes_key32);
key_expansion ((PRIVATE_AS const u8 *) ctx.h, newdes_key32);
for (int i = 0; i < 60; i++)
{
@ -182,7 +182,7 @@ KERNEL_FQ KERNEL_FA void m32700_loop (KERN_ATTR_TMPS (sha1_tmp_t))
}
// Run 1000 iterations of NewDES on the derived salt
for (int i = 0; i < LOOP_CNT; i++)
for (u32 i = 0; i < LOOP_CNT; i++)
{
new_des (salt32, newdes_key32);
}