mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-06-17 01:56:10 -05:00
Update Format DLL SDK for VeraCrypt 1.26.29
Keep Argon2 symbols internal unless explicitly exported so VeraCryptFormat.dll exposes only the SDK API. Add Argon2id/BLAKE2b aliases for the SDK hash selector and update the public header comment to reflect the supported KDF/hash set.
This commit is contained in:
@@ -41,7 +41,7 @@ extern "C" {
|
||||
#ifdef A2_VISCTL
|
||||
#define ARGON2_PUBLIC __attribute__((visibility("default")))
|
||||
#define ARGON2_LOCAL __attribute__ ((visibility ("hidden")))
|
||||
#elif defined(_MSC_VER)
|
||||
#elif defined(_MSC_VER) && defined(ARGON2_EXPORTS)
|
||||
#define ARGON2_PUBLIC __declspec(dllexport)
|
||||
#define ARGON2_LOCAL
|
||||
#else
|
||||
|
||||
@@ -110,6 +110,9 @@ static int MapHashAlgorithm(const wchar_t* hashName)
|
||||
if (_wcsicmp(hashName, L"sha256") == 0) return SHA256;
|
||||
if (_wcsicmp(hashName, L"sha512") == 0) return SHA512;
|
||||
if (_wcsicmp(hashName, L"argon2") == 0) return ARGON2;
|
||||
if (_wcsicmp(hashName, L"argon2id") == 0) return ARGON2;
|
||||
if (_wcsicmp(hashName, L"BLAKE2b") == 0) return ARGON2;
|
||||
if (_wcsicmp(hashName, L"BLAKE2b-512") == 0) return ARGON2;
|
||||
return 0; // Not found
|
||||
}
|
||||
|
||||
@@ -399,4 +402,4 @@ extern "C"
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
* around the core logic from Tcformat.c and related VeraCrypt source files.
|
||||
*
|
||||
* First created by Mounir IDRASSI (mounir.idrassi@amcrypto.jp)
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
@@ -66,7 +66,7 @@ typedef struct _VeraCryptFormatOptions
|
||||
/** The encryption algorithm to use. E.g., L"AES", L"Serpent", L"Twofish", L"AES-Twofish-Serpent". */
|
||||
const wchar_t* encryptionAlgorithm;
|
||||
|
||||
/** The header key derivation algorithm and random pool hash selector. E.g., L"Argon2" (Argon2id KDF), L"SHA-512", L"RIPEMD-160", L"Whirlpool", L"BLAKE2s-256", L"SHA-256". */
|
||||
/** The header key derivation algorithm and random pool hash selector. E.g., L"Argon2" (Argon2id KDF), L"SHA-512", L"SHA-256", L"Whirlpool", L"BLAKE2s-256", L"Streebog". */
|
||||
const wchar_t* hashAlgorithm;
|
||||
|
||||
/** The filesystem for the new volume. E.g., L"NTFS", L"FAT", L"ExFAT", L"ReFS", or L"None". */
|
||||
@@ -74,10 +74,10 @@ typedef struct _VeraCryptFormatOptions
|
||||
|
||||
/** The cluster size in sectors (e.g., 1, 2, 4, 8...). Use 0 for default. */
|
||||
int clusterSize;
|
||||
|
||||
|
||||
/** If TRUE, performs a quick format. This is faster but less secure as old data is not overwritten. */
|
||||
BOOL quickFormat;
|
||||
|
||||
|
||||
/** If TRUE, creates a dynamically-expanding (sparse) file container. Only for file containers. Implies quickFormat=TRUE. */
|
||||
BOOL dynamicFormat;
|
||||
|
||||
@@ -159,4 +159,4 @@ VCF_API int __cdecl VeraCryptFormat(const VeraCryptFormatOptions* options);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user