mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-26 08:28:20 +00:00
Add const to a few parameters.
Suggested by clang-tidy
This commit is contained in:
parent
2a56a229fa
commit
496fc309fe
@ -44,7 +44,7 @@
|
||||
PERM_OP (l, r, tt, 4, 0x0f0f0f0f); \
|
||||
}
|
||||
|
||||
void _des_keysetup (u32 data[2], u32 Kc[16], u32 Kd[16]);
|
||||
void _des_encrypt (u32 data[2], u32 Kc[16], u32 Kd[16]);
|
||||
void _des_keysetup (const u32 data[2], u32 Kc[16], u32 Kd[16]);
|
||||
void _des_encrypt (u32 data[2], const u32 Kc[16], const u32 Kd[16]);
|
||||
|
||||
#endif // _CPU_DES_H
|
||||
|
@ -8,6 +8,6 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void md4_64 (u32 block[16], u32 digest[4]);
|
||||
void md4_64 (const u32 block[16], u32 digest[4]);
|
||||
|
||||
#endif // _CPU_MD4_H
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void md5_64 (u32 block[16], u32 digest[4]);
|
||||
void md5_64 (const u32 block[16], u32 digest[4]);
|
||||
void md5_complete_no_limit (u32 digest[4], u32 *plain, u32 plain_len);
|
||||
|
||||
#endif // _CPU_MD5_H
|
||||
|
@ -6,6 +6,6 @@
|
||||
#ifndef _CPU_SHA1_H
|
||||
#define _CPU_SHA1_H
|
||||
|
||||
void sha1_64 (u32 block[16], u32 digest[5]);
|
||||
void sha1_64 (const u32 block[16], u32 digest[5]);
|
||||
|
||||
#endif // _CPU_SHA1_H
|
||||
|
@ -6,6 +6,6 @@
|
||||
#ifndef _CPU_SHA256_H
|
||||
#define _CPU_SHA256_H
|
||||
|
||||
void sha256_64 (u32 block[16], u32 digest[8]);
|
||||
void sha256_64 (const u32 block[16], u32 digest[8]);
|
||||
|
||||
#endif // _CPU_SHA256_H
|
||||
|
@ -326,7 +326,7 @@ static const u32 c_skb[8][64] =
|
||||
}
|
||||
};
|
||||
|
||||
void _des_keysetup (u32 data[2], u32 Kc[16], u32 Kd[16])
|
||||
void _des_keysetup (const u32 data[2], u32 Kc[16], u32 Kd[16])
|
||||
{
|
||||
u32 c = data[0];
|
||||
u32 d = data[1];
|
||||
@ -384,7 +384,7 @@ void _des_keysetup (u32 data[2], u32 Kc[16], u32 Kd[16])
|
||||
}
|
||||
}
|
||||
|
||||
void _des_encrypt (u32 data[2], u32 Kc[16], u32 Kd[16])
|
||||
void _des_encrypt (u32 data[2], const u32 Kc[16], const u32 Kd[16])
|
||||
{
|
||||
u32 r = data[0];
|
||||
u32 l = data[1];
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "inc_hash_functions.cl"
|
||||
#include "cpu_md4.h"
|
||||
|
||||
void md4_64 (u32 block[16], u32 digest[4])
|
||||
void md4_64 (const u32 block[16], u32 digest[4])
|
||||
{
|
||||
u32 w0[4];
|
||||
u32 w1[4];
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "inc_hash_functions.cl"
|
||||
#include "cpu_md5.h"
|
||||
|
||||
void md5_64 (u32 block[16], u32 digest[4])
|
||||
void md5_64 (const u32 block[16], u32 digest[4])
|
||||
{
|
||||
u32 w0[4];
|
||||
u32 w1[4];
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "inc_hash_functions.cl"
|
||||
#include "cpu_sha1.h"
|
||||
|
||||
void sha1_64 (u32 block[16], u32 digest[5])
|
||||
void sha1_64 (const u32 block[16], u32 digest[5])
|
||||
{
|
||||
u32 a = digest[0];
|
||||
u32 b = digest[1];
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "inc_hash_functions.cl"
|
||||
#include "cpu_sha256.h"
|
||||
|
||||
void sha256_64 (u32 block[16], u32 digest[8])
|
||||
void sha256_64 (const u32 block[16], u32 digest[8])
|
||||
{
|
||||
u32 w0_t = block[ 0];
|
||||
u32 w1_t = block[ 1];
|
||||
|
@ -86,7 +86,7 @@ static void hlfmt_user_hashcat (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, char *l
|
||||
|
||||
// hlfmt pwdump
|
||||
|
||||
static int hlfmt_detect_pwdump (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, char *line_buf, int line_len)
|
||||
static int hlfmt_detect_pwdump (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, const char *line_buf, int line_len)
|
||||
{
|
||||
int sep_cnt = 0;
|
||||
|
||||
@ -183,7 +183,7 @@ static void hlfmt_user_pwdump (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, char *li
|
||||
|
||||
// hlfmt passwd
|
||||
|
||||
static int hlfmt_detect_passwd (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, char *line_buf, int line_len)
|
||||
static int hlfmt_detect_passwd (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, const char *line_buf, int line_len)
|
||||
{
|
||||
int sep_cnt = 0;
|
||||
|
||||
@ -266,7 +266,7 @@ static void hlfmt_user_passwd (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, char *li
|
||||
|
||||
// hlfmt shadow
|
||||
|
||||
static int hlfmt_detect_shadow (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, char *line_buf, int line_len)
|
||||
static int hlfmt_detect_shadow (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, const char *line_buf, int line_len)
|
||||
{
|
||||
int sep_cnt = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user