Typo fixes and codespell update
This commit is contained in:
parent
1f5ba4040a
commit
f42da11f6d
|
@ -93,15 +93,21 @@ jobs:
|
|||
echo 'unsoecific->unspecific' >> dictionary.txt
|
||||
echo 'soecific->specific' >> dictionary.txt
|
||||
echo 'cpecific->specific' >> dictionary.txt
|
||||
echo 'incomatible->incompatible' >> dictionary.txt
|
||||
echo 'maliciouse->malicious' >> dictionary.txt
|
||||
echo 'strickt->strict' >> dictionary.txt
|
||||
echo 'brak->break' >> dictionary.txt
|
||||
echo "lets->let's" >> dictionary.txt
|
||||
echo 'crome->Chrome' >> dictionary_code.txt
|
||||
echo 'chromim->Chromium' >> dictionary_code.txt
|
||||
echo 'kmdutill->kmdutil' >> dictionary_code.txt
|
||||
echo 'ancrypted->an crypted' >> dictionary_code.txt
|
||||
echo 'ancrypted->encrypted' >> dictionary_code.txt
|
||||
echo 'hadrware->hardware' >> dictionary_code.txt
|
||||
echo 'sandbocie->Sandboxie' >> dictionary_code.txt
|
||||
echo 'sanboxie->Sandboxie' >> dictionary_code.txt
|
||||
echo "sandboxies->Sandboxie's, sandboxed" >> dictionary_code.txt
|
||||
echo 'reparese->reparse' >> dictionary_code.txt
|
||||
# Only lowercase letters are allowed in --ignore-words-list
|
||||
codespell --dictionary=dictionary.txt --dictionary=dictionary_rare.txt --dictionary=dictionary_code.txt \
|
||||
--ignore-words-list="wil,unknwn,tolen,pevent,doubleclick,parm,parms,etcp,ois,ba,ptd,modell,namesd,stdio,uint,errorstring,ontext,atend,deque,ecounter,nmake,namess,inh,daa,varient,lite,uis,emai,ws,slanguage,woh,tne,typpos" \
|
||||
--skip="./.git,./.github/workflows/codespell.yml,./dictionary*.txt,./Sandboxie/msgs/Text-*-*.txt,./Sandboxie/msgs/report/Report-*.txt,./SandboxiePlus/SandMan/*.ts,./Installer/Languages.iss,./Installer/isl/*.isl,./Sandboxie/common/Detours/Makefile,./Sandboxie/common/Detours/disasm.cpp,./Sandboxie/install/build.bat"
|
||||
--ignore-words-list="wil,unknwn,tolen,pevent,doubleclick,parm,parms,etcp,ois,ba,ptd,modell,namesd,stdio,uint,errorstring,ontext,atend,deque,ecounter,nmake,namess,inh,daa,varient,lite,uis,emai,ws,slanguage,woh,tne,typpos,enew,shft,seh,ser" \
|
||||
--skip="./.git,./.github/workflows/codespell.yml,./dictionary*.txt,./Sandboxie/msgs/Text-*-*.txt,./Sandboxie/msgs/report/Report-*.txt,./SandboxiePlus/SandMan/*.ts,./Installer/Languages.iss,./Installer/isl/*.isl,./Sandboxie/common/Detours/Makefile,./Sandboxie/common/Detours/disasm.cpp,./Sandboxie/install/build.bat,./SandboxieTools/ImBox/dc/crypto_fast/xts_fast.c,./Sandboxie/apps/control/TreePropSheet.h,./Sandboxie/apps/control/PropPageFrame.h,./Sandboxie/apps/control/PropPageFrameDefault.h"
|
||||
|
|
|
@ -1680,7 +1680,7 @@ ULONG RestartInSandbox(void)
|
|||
// build command line. note that we pass the current directory as an
|
||||
// environment variable which will be queried by Program_Start. this
|
||||
// is because SbieSvc ProcessServer (used by SbieDll_RunSandboxed)
|
||||
// does not necssarily share our dos device map, and will not be able
|
||||
// does not necessarily share our dos device map, and will not be able
|
||||
// to change to a drive letter that isn't in its dos device map
|
||||
//
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ const GUID DETOUR_EXE_HELPER_GUID = { /* ea0251b9-5cde-41b5-98d0-2af4a26b0fee */
|
|||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Enumate through modules in the target process.
|
||||
// Enumerate through modules in the target process.
|
||||
//
|
||||
static BOOL WINAPI LoadNtHeaderFromProcess(HANDLE hProcess,
|
||||
HMODULE hModule,
|
||||
|
|
|
@ -418,7 +418,7 @@ _FX NTSTATUS File_MigrateFile(
|
|||
|
||||
ULONG Cur_Ticks = GetTickCount();
|
||||
if (Next_Status < Cur_Ticks) {
|
||||
Next_Status = Cur_Ticks + 1000; // update prgress every second
|
||||
Next_Status = Cur_Ticks + 1000; // update progress every second
|
||||
|
||||
WCHAR size_str[32];
|
||||
Sbie_snwprintf(size_str, 32, L"%I64u", file_size);
|
||||
|
|
|
@ -927,7 +927,7 @@ _FX FILE_LINK *File_AddTempLink(WCHAR *path)
|
|||
File_GetCopyPath(path, &CopyPath);
|
||||
|
||||
//
|
||||
// get tempalte file if present, and reparese the path
|
||||
// get template file if present, and reparse the path
|
||||
//
|
||||
|
||||
WCHAR* TmplName = File_FindSnapshotPath(CopyPath);
|
||||
|
|
|
@ -759,7 +759,7 @@ _FX NTSTATUS Ipc_GetName(
|
|||
// //
|
||||
// // Since in this mode we don't call Ipc_CreateObjects we don't have a boxed namespace
|
||||
// // and are using existing namespaces only with a name suffix
|
||||
// // hence we can't use Global without system provileges, so we strip it
|
||||
// // hence we can't use Global without system privileges, so we strip it
|
||||
// //
|
||||
//
|
||||
// if (_wcsnicmp(objname_buf, L"Global\\", 7) == 0) {
|
||||
|
|
|
@ -744,7 +744,7 @@ _FX BOOL Proc_CreateAppContainerToken(
|
|||
_FX const WCHAR* SbieDll_FindArgumentEnd(const WCHAR* arguments)
|
||||
{
|
||||
//
|
||||
// when suplying: "aaaa \"bb cc\"ddd\"e\\"f\" gg hh \\"ii \"jjjj kkkk"
|
||||
// when supplying: "aaaa \"bb cc\"ddd\"e\\"f\" gg hh \\"ii \"jjjj kkkk"
|
||||
// to an application for (int i = 0; i < argc; i++) printf("%s\n", argv[i]); gives:
|
||||
// "aaaa", "bb ccddde\"f", "gg", "hh", "\"ii", "jjjj kkkk"
|
||||
// here we exactly replicate this parsing scheme
|
||||
|
|
|
@ -840,7 +840,7 @@ _FX NTSTATUS KphValidateCertificate()
|
|||
expiration_date.QuadPart = cert_date.QuadPart + KphGetDateInterval((CSHORT)(level ? _wtoi(level) : 7), 0, 0); // x days, default 7
|
||||
Verify_CertInfo.level = eCertAdvanced;
|
||||
}
|
||||
else if (!level || _wcsicmp(level, L"STANDARD") == 0) // not used, default does not have explicite level
|
||||
else if (!level || _wcsicmp(level, L"STANDARD") == 0) // not used, default does not have explicit level
|
||||
Verify_CertInfo.level = eCertStandard;
|
||||
else if (_wcsicmp(level, L"ADVANCED") == 0)
|
||||
Verify_CertInfo.level = eCertAdvanced;
|
||||
|
|
|
@ -414,7 +414,7 @@ MSG_HEADER *MountManager::QueryHandler(MSG_HEADER *msg)
|
|||
if (pRoot)
|
||||
pMount = pRoot->Mount;
|
||||
}
|
||||
else if (m_RamDisk != NULL) { // empty root to querry ramdisk
|
||||
else if (m_RamDisk != NULL) { // empty root to query ramdisk
|
||||
EnterCriticalSection(&m_CritSec);
|
||||
pMount = m_RamDisk;
|
||||
}
|
||||
|
@ -502,7 +502,7 @@ HANDLE MountManager::OpenOrCreateNtFolder(const WCHAR* NtPath)
|
|||
return NULL;
|
||||
|
||||
WCHAR* dosPath = (WCHAR*)DosPath.c_str();
|
||||
*wcsrchr(dosPath, L'\\') = L'\0'; // truncate path as we want the last fodler to be created with SbieDll_GetPublicSD
|
||||
*wcsrchr(dosPath, L'\\') = L'\0'; // truncate path as we want the last folder to be created with SbieDll_GetPublicSD
|
||||
if (__sys_SHCreateDirectoryExW(NULL, dosPath, NULL) != ERROR_SUCCESS)
|
||||
return NULL;
|
||||
|
||||
|
@ -673,7 +673,7 @@ std::shared_ptr<BOX_MOUNT> MountManager::FindImDisk(const std::wstring& ImageFil
|
|||
|
||||
//
|
||||
// Find an already mounted RamDisk,
|
||||
// we inspect the volume label to determin if its ours
|
||||
// we inspect the volume label to determine if its ours
|
||||
//
|
||||
|
||||
std::vector<ULONG> DeviceList;
|
||||
|
@ -953,7 +953,7 @@ bool MountManager::AcquireBoxRoot(const WCHAR* boxname, const WCHAR* reg_root, c
|
|||
//
|
||||
// We use the [KeyRootPath] to uniquely identify a sandbox, the driver requires
|
||||
// booth [KeyRootPath] as well as the hive file location [FileRootPath]\RegHive to match,
|
||||
// hence eider is a good unique identifier, in case of a conflict the second sandbox start atempt fails.
|
||||
// hence either is a good unique identifier, in case of a conflict the second sandbox start attempt fails.
|
||||
// As SbieApi_GetUnmountHive provides only [KeyRootPath] and no file path it is expedient to use it.
|
||||
//
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ typedef struct tagIMBOX_QUERY_RPL IMBOX_QUERY_RPL;
|
|||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Mount Manager - Update box image proeprties
|
||||
// Mount Manager - Update box image properties
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
|
|
@ -1227,7 +1227,7 @@ ULONG SbieIniServer::DelSetting(MSG_HEADER* msg)
|
|||
{
|
||||
if (_wcsicmp(I->Name.c_str(), req->setting) == 0 && _wcsicmp(I->Value.c_str(), req->value) == 0) {
|
||||
I = pSection->Entries.erase(I);
|
||||
// Note: we could brak here but lets finish in case tehre is a duplicate
|
||||
// Note: we could break here, but let's finish in case there is a duplicate
|
||||
}
|
||||
else
|
||||
++I;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define _HAS_EXCEPTIONS 0 // we dont have exception support enabled
|
||||
#define _HAS_EXCEPTIONS 0 // we don't have exception support enabled
|
||||
|
||||
#include <ntstatus.h>
|
||||
#define WIN32_NO_STATUS
|
||||
|
|
|
@ -37,7 +37,7 @@ How the function in 7-Zip returns object for output parameter via pointer
|
|||
4) The caller must free or release object returned by the callee:
|
||||
PROPVARIANT : VariantClear(&propvaiant)
|
||||
BSTR : SysFreeString(bstr)
|
||||
IUnknown* and derived interfaces : if (ptr) ptr->Relase()
|
||||
IUnknown* and derived interfaces : if (ptr) ptr->Release()
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ protected:
|
|||
|
||||
#ifdef _WIN32
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
// virtual ~CMyUnknownImp() {} // to disable GCC/CLANG varnings
|
||||
// virtual ~CMyUnknownImp() {} // to disable GCC/CLANG warnings
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -3640,7 +3640,7 @@ This is done to prevent rogue processes inside the sandbox from creating a renam
|
|||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sandboxies functionality can be enhanced using optional dll’s which can be loaded into each sandboxed process on start by the SbieDll.dll, the add-on manager in the global settings offers a couple useful extensions, once installed they can be enabled here for the current box.</string>
|
||||
<string>Sandboxie's functionality can be enhanced by using optional DLLs which can be loaded into each sandboxed process on start by the SbieDll.dll file, the add-on manager in the global settings offers a couple of useful extensions, once installed they can be enabled here for the current box.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
|
|
|
@ -295,7 +295,7 @@ void COnlineUpdater::LoadState()
|
|||
QString COnlineUpdater::GetOnNewUpdateOption() const
|
||||
{
|
||||
if (!g_CertInfo.active || g_CertInfo.expired)
|
||||
return "ignore"; // this service requries a valid vcertificate
|
||||
return "ignore"; // this service requires a valid certificate
|
||||
return theConf->GetString("Options/OnNewUpdate", "ignore");
|
||||
}
|
||||
|
||||
|
@ -310,9 +310,9 @@ QString COnlineUpdater::GetOnNewReleaseOption() const
|
|||
bool COnlineUpdater::ShowCertWarningIfNeeded()
|
||||
{
|
||||
//
|
||||
// This function checks if this instalation uses a expired personal
|
||||
// This function checks if this installation uses a expired personal
|
||||
// certificate which is active for the current build
|
||||
// in which case it it shows a warning that updating to the latest build
|
||||
// in which case it shows a warning that updating to the latest build
|
||||
// will deactivate the certificate
|
||||
//
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ function try_fix_PC_SRP()
|
|||
{id: 'disable', name: 'Disable Parental Control Policy', type: 'radio'},
|
||||
{id: 'failed', name: 'The above mitigations did not work', type: 'radio'},
|
||||
];
|
||||
let obj = wizard.showForm(form, tr('It seams you are using a non administrative user account on a system with enabled parental controls, this is a known to be incomatible with sandboxie.\nYou have the following options to resolve the issue.'));
|
||||
let obj = wizard.showForm(form, tr('It seems you are using a non-administrative user account on a system with enabled parental controls, this is known to be incompatible with Sandboxie.\nYou have the following options to resolve the issue.'));
|
||||
|
||||
//_debugger();
|
||||
|
||||
|
|
|
@ -1260,7 +1260,7 @@ void CSettingsWindow::OnGetCert()
|
|||
SB_PROGRESS Status = theGUI->m_pUpdater->GetSupportCert(ui.txtSerial->text(), this, SLOT(OnCertData(const QByteArray&, const QVariantMap&)));
|
||||
if (Status.GetStatus() == OP_ASYNC) {
|
||||
theGUI->AddAsyncOp(Status.GetValue());
|
||||
Status.GetValue()->ShowMessage(tr("Retreiving certificate..."));
|
||||
Status.GetValue()->ShowMessage(tr("Retrieving certificate..."));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,9 +68,9 @@ SB_STATUS CNewBoxWizard::TryToCreateBox()
|
|||
bool State = false;
|
||||
if(CCheckableMessageBox::question(this, "Sandboxie-Plus",
|
||||
tr("This sandbox content will be placed in an encrypted container file, "
|
||||
"please note that any corruption of the container's header will render all its content permanently innaccessible. "
|
||||
"Corruption can occur as a result of a BSOD, a storage hadrware failure, or a maliciouse application overwriting random files. "
|
||||
"This feature is provided under a strickt <b>No Backup No Mercy</b> policy, YOU the user are responsible for the data you put into an encrypted box. "
|
||||
"please note that any corruption of the container's header will render all its content permanently inaccessible. "
|
||||
"Corruption can occur as a result of a BSOD, a storage hardware failure, or a malicious application overwriting random files. "
|
||||
"This feature is provided under a strict <b>No Backup No Mercy</b> policy, YOU the user are responsible for the data you put into an encrypted box. "
|
||||
"<br /><br />"
|
||||
"IF YOU AGREE TO TAKE FULL RESPONSIBILITY FOR YOUR DATA PRESS [YES], OTHERWISE PRESS [NO].")
|
||||
, tr("Don't show this message again."), &State, QDialogButtonBox::Yes | QDialogButtonBox::No, QDialogButtonBox::No, QMessageBox::Warning) != QDialogButtonBox::Yes)
|
||||
|
@ -448,7 +448,7 @@ bool CBoxTypePage::validatePage()
|
|||
#endif
|
||||
|
||||
if ((BoxType == CSandBoxPlus::ePrivate || BoxType == CSandBoxPlus::ePrivatePlus) && !theGUI->IsImDiskReady()) {
|
||||
theGUI->GetAddonManager()->TryInstallAddon("ImDisk", this, tr("To use ancrypted boxes you need to install the ImDisk driver, do you want to download and install it?"));
|
||||
theGUI->GetAddonManager()->TryInstallAddon("ImDisk", this, tr("To use encrypted boxes you need to install the ImDisk driver, do you want to download and install it?"));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -344,7 +344,7 @@ void CCertificatePage::OnCertData(const QByteArray& Certificate, const QVariantM
|
|||
wizard()->next();
|
||||
}
|
||||
else {
|
||||
QString Message = tr("Failed to retrive the certificate.");
|
||||
QString Message = tr("Failed to retrieve the certificate.");
|
||||
Message += tr("\nError: %1").arg(Params["error"].toString());
|
||||
QMessageBox::critical(this, "Sandboxie-Plus", Message);
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ bool CCertificatePage::validatePage()
|
|||
SB_PROGRESS Status = theGUI->m_pUpdater->GetSupportCert(Serial, this, SLOT(OnCertData(const QByteArray&, const QVariantMap&)));
|
||||
if (Status.GetStatus() == OP_ASYNC) {
|
||||
theGUI->AddAsyncOp(Status.GetValue());
|
||||
Status.GetValue()->ShowMessage(tr("Retreiving certificate..."));
|
||||
Status.GetValue()->ShowMessage(tr("Retrieving certificate..."));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -146,7 +146,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
|||
pImDisk->SetMountSection(hMapping, pSection);
|
||||
|
||||
//
|
||||
// defien shutdown behavioure
|
||||
// define shutdown behaviour
|
||||
//
|
||||
|
||||
SetProcessShutdownParameters(0x100, 0);
|
||||
|
|
|
@ -156,7 +156,7 @@ DWORD WINAPI CImDiskIO_Thread(LPVOID lpThreadParameter)
|
|||
{
|
||||
//
|
||||
// !!! NOTE !!! After this thread was created the rest of the code does not touch
|
||||
// the m members which we use here so we dont bother with explicite synchronization
|
||||
// the m members which we use here so we don't bother with explicit synchronization
|
||||
// hence this thread is responsible freeing m
|
||||
//
|
||||
|
||||
|
@ -234,7 +234,7 @@ DWORD WINAPI CImDiskIO_Thread(LPVOID lpThreadParameter)
|
|||
if (FormatVolume(Drive.c_str(), fs, label)) {
|
||||
|
||||
if (!IsVolumeUnRecognized(Device)) // check success
|
||||
DbgPrint(L"Successfully Formated: %s\n", m->Mount.c_str());
|
||||
DbgPrint(L"Successfully Formatted: %s\n", m->Mount.c_str());
|
||||
else {
|
||||
DbgPrint(L"Failed to Format: %s\n", m->Mount.c_str());
|
||||
// Sleep(1000);
|
||||
|
@ -324,7 +324,7 @@ int CImDiskIO::DoComm()
|
|||
if (!m->Mount.empty()) {
|
||||
|
||||
//
|
||||
// clear format directive if formating is not allowed for this disk e.g. non empty image file
|
||||
// clear format directive if formatting is not allowed for this disk e.g. non empty image file
|
||||
// to force format you can use imdisk: params="-p \"/fs:ntfs /q /y\""
|
||||
//
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
; suggestions made by him for which I am most grateful.
|
||||
|
||||
; An AES implementation for AMD64 processors using the YASM assembler. This
|
||||
; implemetation provides only encryption, decryption and hence requires key
|
||||
; implementation provides only encryption, decryption and hence requires key
|
||||
; scheduling support in C. It uses 8k bytes of tables but its encryption and
|
||||
; decryption performance is very close to that obtained using large tables.
|
||||
; It can use either Windows or Gnu/Linux calling conventions, which are as
|
||||
|
|
|
@ -215,9 +215,9 @@ twofish256_encrypt:
|
|||
push R1Q
|
||||
push rsi
|
||||
push rdi
|
||||
; r8 contains the crypto tfm adress
|
||||
; rdx contains the output adress
|
||||
; rcx contains the input adress
|
||||
; r8 contains the crypto tfm address
|
||||
; rdx contains the output address
|
||||
; rcx contains the input address
|
||||
mov rsi, rdx
|
||||
|
||||
mov R1Q, [rcx]
|
||||
|
@ -270,9 +270,9 @@ twofish256_decrypt:
|
|||
push R1Q
|
||||
push rsi
|
||||
push rdi
|
||||
; r8 contains the crypto tfm adress
|
||||
; rdx contains the output adress
|
||||
; rcx contains the input adress
|
||||
; r8 contains the crypto tfm address
|
||||
; rdx contains the output address
|
||||
; rcx contains the input address
|
||||
mov rsi, rdx
|
||||
|
||||
mov R1Q, [rcx]
|
||||
|
|
|
@ -219,8 +219,8 @@ _twofish256_encrypt@12:
|
|||
push ebx
|
||||
push esi
|
||||
push edi
|
||||
mov ebp, [tfm + 16+esp] ; abuse the base pointer: set new base bointer to the crypto tfm
|
||||
mov edi, [in_blk+16+esp] ; input adress in edi
|
||||
mov ebp, [tfm + 16+esp] ; abuse the base pointer: set new base pointer to the crypto tfm
|
||||
mov edi, [in_blk+16+esp] ; input address in edi
|
||||
|
||||
mov eax, [edi]
|
||||
mov ebx, [b_offset+edi]
|
||||
|
@ -273,8 +273,8 @@ _twofish256_decrypt@12:
|
|||
push edi
|
||||
|
||||
|
||||
mov ebp, [tfm + 16+esp] ; abuse the base pointer: set new base bointer to the crypto tfm
|
||||
mov edi, [in_blk + 16+esp] ; input adress in edi
|
||||
mov ebp, [tfm + 16+esp] ; abuse the base pointer: set new base pointer to the crypto tfm
|
||||
mov edi, [in_blk + 16+esp] ; input address in edi
|
||||
|
||||
mov eax, [edi]
|
||||
mov ebx, [b_offset+edi]
|
||||
|
|
|
@ -137,7 +137,7 @@ int _stdcall sha512_hmac_drbg_generate( sha512_hmac_drbg_ctx *ctx, const void
|
|||
unsigned char *output, size_t output_len )
|
||||
{
|
||||
if ( (ctx->reseed_counter > SHA512_HMAC_DRBG_RESEED_INTERVAL) || // If reseed_counter > reseed_interval, then return an indication that a reseed is required
|
||||
(additional_len > SHA512_HMAC_DRBG_MAX_ADDITIONAL_BYTES) || // chech max_additional_input_length (NIST SP 800-90A specification)
|
||||
(additional_len > SHA512_HMAC_DRBG_MAX_ADDITIONAL_BYTES) || // check max_additional_input_length (NIST SP 800-90A specification)
|
||||
(output_len > SHA512_HMAC_DRBG_MAX_GENERATED_BYTES) ) // check max_number_of_bits_per_request (NIST SP 800-90A specification)
|
||||
{
|
||||
return -1;
|
||||
|
|
|
@ -31,14 +31,14 @@ void _stdcall sha512_pkcs5_2(int i_count, const void *pwd, size_t pwd_len, const
|
|||
|
||||
while (dklen != 0)
|
||||
{
|
||||
// first interation
|
||||
// first iteration
|
||||
sha512_hmac_init(&ctx, pwd, pwd_len);
|
||||
sha512_hmac_hash(&ctx, salt, salt_len);
|
||||
sha512_hmac_hash(&ctx, &block, sizeof(unsigned long));
|
||||
sha512_hmac_done(&ctx, hmac);
|
||||
memcpy(blk, hmac, SHA512_DIGEST_SIZE);
|
||||
|
||||
// next interations
|
||||
// next iterations
|
||||
for (i = 1; i < i_count; i++)
|
||||
{
|
||||
sha512_hmac_init(&ctx, pwd, pwd_len);
|
||||
|
|
|
@ -86,13 +86,13 @@ void sha512_pkcs5_2(int i_count, const void *pwd, unsigned long pwd_len, const v
|
|||
|
||||
while (dklen != 0)
|
||||
{
|
||||
// first interation
|
||||
// first iteration
|
||||
__movsb(buff, (const unsigned char*)salt, salt_len);
|
||||
((unsigned long*)(buff + salt_len))[0] = _byteswap_ulong(block);
|
||||
sha512_hmac(pwd, pwd_len, buff, salt_len + sizeof(unsigned long), hmac);
|
||||
__movsb(blk, hmac, SHA512_DIGEST_SIZE);
|
||||
|
||||
// next interations
|
||||
// next iterations
|
||||
for (i = 1; i < i_count; i++)
|
||||
{
|
||||
sha512_hmac(pwd, pwd_len, hmac, SHA512_DIGEST_SIZE, hmac);
|
||||
|
|
|
@ -24,7 +24,7 @@ details. Consult a lawyer for legal advice.
|
|||
The primary license of Yasm is the 2-clause BSD license. Please use this
|
||||
license if you plan on submitting code to the project.
|
||||
|
||||
Yasm has absolutely no warranty; not even for merchantibility or fitness
|
||||
Yasm has absolutely no warranty; not even for merchantability or fitness
|
||||
for a particular purpose.
|
||||
|
||||
-------
|
||||
|
|
|
@ -291,7 +291,7 @@ typedef ULONG DEVICE_DATA_MANAGEMENT_SET_ACTION;
|
|||
//
|
||||
|
||||
typedef struct _DEVICE_DATA_SET_RANGE {
|
||||
LONGLONG StartingOffset; //in bytes, must allign to sector
|
||||
LONGLONG StartingOffset; //in bytes, must align to sector
|
||||
ULONGLONG LengthInBytes; // multiple of sector size.
|
||||
} DEVICE_DATA_SET_RANGE, *PDEVICE_DATA_SET_RANGE;
|
||||
|
||||
|
@ -309,10 +309,10 @@ typedef struct _DEVICE_MANAGE_DATA_SET_ATTRIBUTES {
|
|||
|
||||
ULONG Flags; // Global flags across all actions
|
||||
|
||||
ULONG ParameterBlockOffset; // must be alligned to corresponding structure allignment
|
||||
ULONG ParameterBlockOffset; // must be aligned to corresponding structure alignment
|
||||
ULONG ParameterBlockLength; // 0 means Parameter Block does not exist.
|
||||
|
||||
ULONG DataSetRangesOffset; // must be alligned to DEVICE_DATA_SET_RANGE structure allignment.
|
||||
ULONG DataSetRangesOffset; // must be aligned to DEVICE_DATA_SET_RANGE structure alignment.
|
||||
ULONG DataSetRangesLength; // 0 means DataSetRanges Block does not exist.
|
||||
|
||||
} DEVICE_MANAGE_DATA_SET_ATTRIBUTES, *PDEVICE_MANAGE_DATA_SET_ATTRIBUTES;
|
||||
|
@ -326,7 +326,7 @@ typedef struct _DEVICE_MANAGE_DATA_SET_ATTRIBUTES {
|
|||
//
|
||||
//======================== FSCTL_FILE_LEVEL_TRIM ===========================
|
||||
//
|
||||
// Structure defintions for supporint file level trim
|
||||
// Structure definitions for supporint file level trim
|
||||
//
|
||||
|
||||
typedef struct _FILE_LEVEL_TRIM_RANGE {
|
||||
|
|
|
@ -203,14 +203,14 @@ typedef struct _REPARSE_DATA_BUFFER {
|
|||
#define IO_REPARSE_TAG_IFSTEST_CONGRUENT (0x00000009L)
|
||||
|
||||
//
|
||||
// Tag allocated to Moonwalk Univeral for HSM
|
||||
// Tag allocated to Moonwalk Universal for HSM
|
||||
// GUID: 257ABE42-5A28-4C8C-AC46-8FEA5619F18F
|
||||
//
|
||||
|
||||
#define IO_REPARSE_TAG_MOONWALK_HSM (0x0000000AL)
|
||||
|
||||
//
|
||||
// Tag allocated to Tsinghua Univeristy for Research purposes
|
||||
// Tag allocated to Tsinghua University for Research purposes
|
||||
// No released products should use this tag
|
||||
// GUID: b86dff51-a31e-4bac-b3cf-e8cfe75c9fc2
|
||||
//
|
||||
|
|
|
@ -111,7 +111,7 @@ ConnectTCP(LPCWSTR wszServer, LPCWSTR wszService)
|
|||
return ConnectTCP(wszServer, usPort);
|
||||
}
|
||||
|
||||
/// Enhanced OVERLAPPED stucture with encapsulated API functions.
|
||||
/// Enhanced OVERLAPPED structure with encapsulated API functions.
|
||||
struct WOverlapped : public OVERLAPPED
|
||||
{
|
||||
BOOL Read(HANDLE hFile, LPVOID lpBuf, DWORD dwLength, DWORDLONG dwStart = 0)
|
||||
|
|
Loading…
Reference in New Issue