VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Pkcs5.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2024-11-13 09:28:32 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2024-11-13 09:28:32 +0100
commit75152f7dc0279c9468bfa08e283f1b0b9d87d9cc (patch)
tree842ca1d8d0574616d9701d01a30b42faa0b21c7d /src/Common/Pkcs5.h
parentc63b74bbfeb2d05416595cb6144d8b6cc6235160 (diff)
downloadVeraCrypt-75152f7dc0279c9468bfa08e283f1b0b9d87d9cc.tar.gz
VeraCrypt-75152f7dc0279c9468bfa08e283f1b0b9d87d9cc.zip
Use adequate const qualifiers for pbkdf2 functions arguments
Diffstat (limited to 'src/Common/Pkcs5.h')
-rw-r--r--src/Common/Pkcs5.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Common/Pkcs5.h b/src/Common/Pkcs5.h
index 37a6caff..65fad038 100644
--- a/src/Common/Pkcs5.h
+++ b/src/Common/Pkcs5.h
@@ -1,61 +1,61 @@
/*
Legal Notice: Some portions of the source code contained in this file were
derived from the source code of TrueCrypt 7.1a, which is
Copyright (c) 2003-2012 TrueCrypt Developers Association and which is
governed by the TrueCrypt License 3.0, also from the source code of
Encryption for the Masses 2.02a, which is Copyright (c) 1998-2000 Paul Le Roux
and which is governed by the 'License Agreement for Encryption for the Masses'
Modifications and additions to the original source code (contained in this file)
and all other portions of this file are Copyright (c) 2013-2017 IDRIX
and are governed by the Apache License 2.0 the full text of which is
contained in the file License.txt included in VeraCrypt binary and source
code distribution packages. */
#ifndef TC_HEADER_PKCS5
#define TC_HEADER_PKCS5
#include "Tcdefs.h"
#if defined(__cplusplus)
extern "C"
{
#endif
/* output written to input_digest which must be at lease 32 bytes long */
void hmac_blake2s (unsigned char *key, int keylen, unsigned char *input_digest, int len);
-void derive_key_blake2s (unsigned char *pwd, int pwd_len, unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen);
+void derive_key_blake2s (const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen);
/* output written to d which must be at lease 32 bytes long */
void hmac_sha256 (unsigned char *k, int lk, unsigned char *d, int ld);
-void derive_key_sha256 (unsigned char *pwd, int pwd_len, unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen);
+void derive_key_sha256 (const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen);
#ifndef TC_WINDOWS_BOOT
/* output written to d which must be at lease 64 bytes long */
void hmac_sha512 (unsigned char *k, int lk, unsigned char *d, int ld);
-void derive_key_sha512 (unsigned char *pwd, int pwd_len, unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen);
+void derive_key_sha512 (const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen);
/* output written to d which must be at lease 64 bytes long */
void hmac_whirlpool (unsigned char *k, int lk, unsigned char *d, int ld);
-void derive_key_whirlpool (unsigned char *pwd, int pwd_len, unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen);
+void derive_key_whirlpool (const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen);
-void hmac_streebog (unsigned char *k, int32 lk, unsigned char *d, int32 ld);
-void derive_key_streebog (unsigned char *pwd, int pwd_len, unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen);
+void hmac_streebog (unsigned char *k, int lk, unsigned char *d, int ld);
+void derive_key_streebog (const unsigned char *pwd, int pwd_len, const unsigned char *salt, int salt_len, uint32 iterations, unsigned char *dk, int dklen);
int get_pkcs5_iteration_count (int pkcs5_prf_id, int pim, BOOL bBoot);
wchar_t *get_pkcs5_prf_name (int pkcs5_prf_id);
/* check if given PRF supported.*/
typedef enum
{
PRF_BOOT_NO = 0,
PRF_BOOT_MBR,
PRF_BOOT_GPT
} PRF_BOOT_TYPE;
int is_pkcs5_prf_supported (int pkcs5_prf_id, PRF_BOOT_TYPE bootType);
#endif
#if defined(__cplusplus)
}
#endif
#endif // TC_HEADER_PKCS5