├── Build ├── ToDo.txt ├── AddLanguage.vb ├── XecretsFileClassic.ico ├── Sigs.template.xml ├── Version.wxi.template ├── packages.config ├── Sigs.xml ├── BuildDummy.cpp ├── resource.h ├── Config.xml ├── Version.h.template ├── README.txt └── Build.vcxproj.filters ├── AxWinLib ├── AxAssert.cpp ├── AxMLite.cpp ├── CVersionWin.h ├── CVersionWin.cpp ├── CWinVersion.cpp ├── DynLoadString.h ├── GetModuleFileName.h ├── StdAfx.cpp ├── StdAfx.h ├── targetver.h ├── GetModuleFilename.cpp ├── IStaticHyperlink.h ├── ReadMe.txt ├── VistaOrLater.h ├── DynLoadString.cpp ├── IDocumentAppLaunch.h ├── IWinVersion.h ├── CDocumentAppLaunch.cpp └── mygetopt.h ├── AxDecrypt ├── Passphrase.cpp ├── RelNotes.txt ├── StdAfx.cpp ├── ChangeLog.txt ├── AxDecrypt.manifest.Win32 ├── AxDecrypt.vcxproj.filters ├── ReadMe.txt └── AxDecrypt.h ├── XecretsFile2Go ├── CDialogs.cpp ├── GoGreen.bmp ├── GoGrey.bmp ├── Toolbar.bmp ├── XecretsFile2Go.ico ├── stdafx.cpp ├── CDialogs.h ├── XecretsFile2Go.manifest.Win32 ├── XecretsFile2GoWin.h ├── CConfigWin.h ├── Axgettext.h ├── ReadMe.txt ├── resource.h └── stdafx.h ├── XecretsFileClassic ├── Constants.cpp ├── StdAfx.cpp ├── targetver.h ├── DlgLicense.h ├── DlgRegistration.h ├── CSha1.h ├── Dialog.h ├── XecretsFileClassic.manifest.Win32 ├── XecretsFileClassic.manifest.x64 ├── CActiveThreads.h ├── CCryptoRand.h ├── CFileTemp.h ├── ReadMe.txt ├── CWrapper.h ├── FileCmd.h ├── resource.h ├── CCryptoHeap.h └── AxConfig.h ├── XecretsFileShellExt ├── CtxMenu.bmp ├── XecretsFileShellExt.def ├── StdAfx.cpp ├── StdAfx.h ├── targetver.h ├── XecretsFileShellExt.manifest.Win32 ├── XecretsFileShellExt.manifest.x64 ├── ReadMe.txt ├── resource.h ├── XecretsFileShellExt.vcxproj.filters └── XecretsFileShellExtInit.cpp ├── XecretsFileMessages ├── AddLanguage.vb ├── XecretsFileTexts.mc ├── AddLanguage │ └── AddLanguage.vsmacros ├── resource.h ├── MessageCompiler.rules ├── MessageCompiler.props ├── XecretsFileMessages.vcxproj.filters └── XecretsFileMessages.rc ├── .gitignore ├── DependencyOrder ├── DependencyOrder.cpp ├── stdafx.cpp ├── targetver.h ├── stdafx.h └── ReadMe.txt ├── .hgignore ├── AxPortLib ├── stdafx.cpp ├── stdafx.h ├── targetver.h ├── ReadMe.txt ├── ttchar.h ├── AxPortLib.vcxproj.filters └── strcvt.h ├── XecretsFileLib ├── stdafx.cpp ├── stdafx.h ├── ReadMe.txt ├── CXecretsFileLib.cpp ├── Assert.h ├── XecretsFileLibPP.cpp └── XecretsFileLib.vcxproj.filters ├── XecretsFileCommon ├── stdafx.cpp ├── CHeapCheck.h ├── stdafx.h ├── targetver.h ├── Oem.h ├── ReadMe.txt ├── XecretsFileGUID.h ├── CFmtMsg.h ├── CSubKey.h ├── CStrPtr.h ├── CRegistry.h ├── CSubKey.cpp ├── CFmtMsg.cpp └── CFileName.h ├── Build.cmd ├── AxSigLib ├── targetver.h ├── stdafx.cpp ├── AxSigLib.h ├── Base34.h ├── ReadMe.txt ├── stdafx.h ├── Base34Enc.h ├── Base34Dec.h ├── Base34Dec.cpp ├── BaseM.h ├── CRestrictMgr.h ├── BaseMDec.h ├── CLicMgr.h ├── CRestrictMgr.cpp └── SSign.h ├── AxPipe ├── stdafx.h ├── targetver.h ├── ReadMe.txt ├── stdafx.cpp ├── CSourceAxMLite.h ├── AxPipe.cpp ├── TBits.h ├── CPipeHMAC_SHA1.h └── Examples.h ├── SHA-1 ├── sha1.h ├── SHA-1.vcxproj.filters └── ReadMe.txt ├── AES ├── AES.vcxproj.filters ├── ReadMe.txt └── rijndael-alg-fst.h └── XecretsFileWinLib └── ReadMe.txt /Build/ToDo.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/Build/ToDo.txt -------------------------------------------------------------------------------- /AxWinLib/AxAssert.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/AxWinLib/AxAssert.cpp -------------------------------------------------------------------------------- /AxWinLib/AxMLite.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/AxWinLib/AxMLite.cpp -------------------------------------------------------------------------------- /AxWinLib/CVersionWin.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/AxWinLib/CVersionWin.h -------------------------------------------------------------------------------- /Build/AddLanguage.vb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/Build/AddLanguage.vb -------------------------------------------------------------------------------- /AxDecrypt/Passphrase.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/AxDecrypt/Passphrase.cpp -------------------------------------------------------------------------------- /AxWinLib/CVersionWin.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/AxWinLib/CVersionWin.cpp -------------------------------------------------------------------------------- /AxWinLib/CWinVersion.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/AxWinLib/CWinVersion.cpp -------------------------------------------------------------------------------- /XecretsFile2Go/CDialogs.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/XecretsFile2Go/CDialogs.cpp -------------------------------------------------------------------------------- /XecretsFile2Go/GoGreen.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/XecretsFile2Go/GoGreen.bmp -------------------------------------------------------------------------------- /XecretsFile2Go/GoGrey.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/XecretsFile2Go/GoGrey.bmp -------------------------------------------------------------------------------- /XecretsFile2Go/Toolbar.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/XecretsFile2Go/Toolbar.bmp -------------------------------------------------------------------------------- /Build/XecretsFileClassic.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/Build/XecretsFileClassic.ico -------------------------------------------------------------------------------- /XecretsFileClassic/Constants.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/XecretsFileClassic/Constants.cpp -------------------------------------------------------------------------------- /XecretsFileShellExt/CtxMenu.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/XecretsFileShellExt/CtxMenu.bmp -------------------------------------------------------------------------------- /XecretsFile2Go/XecretsFile2Go.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/XecretsFile2Go/XecretsFile2Go.ico -------------------------------------------------------------------------------- /XecretsFileMessages/AddLanguage.vb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/XecretsFileMessages/AddLanguage.vb -------------------------------------------------------------------------------- /Build/Sigs.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /XecretsFileMessages/XecretsFileTexts.mc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/XecretsFileMessages/XecretsFileTexts.mc -------------------------------------------------------------------------------- /XecretsFileShellExt/XecretsFileShellExt.def: -------------------------------------------------------------------------------- 1 | LIBRARY ShellExt 2 | 3 | EXPORTS 4 | DllCanUnloadNow private 5 | DllGetClassObject private 6 | -------------------------------------------------------------------------------- /AxWinLib/DynLoadString.h: -------------------------------------------------------------------------------- 1 | #ifndef DYNLOADSTRING_H 2 | #define DYNLOADSTRING_H 3 | extern _TCHAR *DynLoadString(UINT uId, HMODULE hModule = NULL); 4 | #endif 5 | -------------------------------------------------------------------------------- /AxWinLib/GetModuleFileName.h: -------------------------------------------------------------------------------- 1 | #ifndef GETMODULEFILENAME_H 2 | #define GETMODULEFILENAME_H 3 | extern _TCHAR *MyGetModuleFileName(HINSTANCE hModule); 4 | #endif 5 | -------------------------------------------------------------------------------- /Build/Version.wxi.template: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /XecretsFileMessages/AddLanguage/AddLanguage.vsmacros: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xecrets/xecrets-file-classic/HEAD/XecretsFileMessages/AddLanguage/AddLanguage.vsmacros -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .vs 2 | Debug 3 | Release 4 | x64 5 | obj 6 | bin 7 | /*.bak 8 | /Build/Version.txt 9 | *.user 10 | *.aps 11 | /Setup/HeatWaveConvert.log 12 | /packages 13 | -------------------------------------------------------------------------------- /Build/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /DependencyOrder/DependencyOrder.cpp: -------------------------------------------------------------------------------- 1 | // DependencyOrder.cpp : Defines the entry point for the console application. 2 | // 3 | 4 | #include "stdafx.h" 5 | 6 | 7 | int _tmain(int argc, _TCHAR* argv[]) 8 | { 9 | return 0; 10 | } 11 | 12 | -------------------------------------------------------------------------------- /.hgignore: -------------------------------------------------------------------------------- 1 | syntax: glob 2 | *.vcxproj.user 3 | *.opensdf 4 | *.sdf 5 | *.DotSettings 6 | *.suo 7 | Build/Version.txt 8 | Debug/* 9 | Release/* 10 | ipch/* 11 | *.bak 12 | _UpgradeReport_Files/* 13 | UpgradeLog.* 14 | UpgradeLog2.* 15 | .vs 16 | -------------------------------------------------------------------------------- /Build/Sigs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | e8a7f38c5aa2fe29c34e3c0d11a64f825fcb6e27b683853607788805fdf60475309bc884 5 | 3ec651bef8e48278e6212fb8d991006a2b8a889d8e8127102ec01babce2fc971a9caf947 6 | f1d86b2019b84061df808948d4d082581d0e70fa8db224aa 7 | 8 | -------------------------------------------------------------------------------- /AxPortLib/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // AxPortLib.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /AxWinLib/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // AxWinLib.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /XecretsFileClassic/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // XecretsFileClassic.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file -------------------------------------------------------------------------------- /XecretsFileLib/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // XecretsFileLib.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file -------------------------------------------------------------------------------- /XecretsFile2Go/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // XecretsFile2Go.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /DependencyOrder/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // DependencyOrder.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /XecretsFileShellExt/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // XecretsFileShellExt.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file -------------------------------------------------------------------------------- /XecretsFileCommon/stdafx.cpp: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // XecretsFileCommon.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /DependencyOrder/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | 8 | #include 9 | -------------------------------------------------------------------------------- /Build/BuildDummy.cpp: -------------------------------------------------------------------------------- 1 | // It turns out to be easiest to simply build a dummy static library in order to get Visual Studio to 2 | // do the right thing vis-a-vis dependency analysis. Tried with 'Utility', but it was hard to get it 3 | // to pick up the dependencies, i.e. I failed and this seemed easier. 4 | namespace XecretsFileClassic { 5 | extern int BuildDummy = 6 | #include "Version.txt" 7 | ; 8 | }; -------------------------------------------------------------------------------- /Build.cmd: -------------------------------------------------------------------------------- 1 | call "%VSINSTALLDIR%vc\Auxiliary\Build\vcvarsall" x86 2 | MSBuild XecretsFileClassic.sln /p:Configuration=Debug;Platform=Win32 3 | MSBuild XecretsFileClassic.sln /p:Configuration=Release;Platform=Win32 4 | call "%VSINSTALLDIR%vc\Auxiliary\Build\vcvarsall" amd64 5 | MSBuild XecretsFileClassic.sln /p:Configuration=Debug;Platform=x64 6 | MSBuild XecretsFileClassic.sln /p:Configuration=Release;Platform=x64 -------------------------------------------------------------------------------- /DependencyOrder/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #include 11 | #include 12 | 13 | 14 | 15 | // TODO: reference additional headers your program requires here 16 | -------------------------------------------------------------------------------- /XecretsFileCommon/CHeapCheck.h: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | 3 | // 4 | // Helper to detect memory leaks. 5 | // 6 | #ifndef _DEBUGHEAP 7 | #ifdef _DEBUG 8 | class CHeapCheck { 9 | size_t m_stAlloc; 10 | BOOL m_fLeakOk; 11 | LPTSTR m_szFunc; 12 | public: 13 | CHeapCheck(LPTSTR szFunc = _T("[not given]"), BOOL fLeakOk = FALSE); 14 | ~CHeapCheck(); 15 | }; 16 | #endif _DEBUG 17 | #endif _DEBUGHEAP 18 | -------------------------------------------------------------------------------- /AxPortLib/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 11 | 12 | 13 | 14 | // TODO: reference additional headers your program requires here 15 | -------------------------------------------------------------------------------- /AxSigLib/targetver.h: -------------------------------------------------------------------------------- 1 | #ifndef AXSIGLIB_TARGETVER_H 2 | #define AXSIGLIB_TARGETVER_H 3 | 4 | // The following macros define the minimum required platform. The minimum required platform 5 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 6 | // your application. The macros work by enabling all features available on platform versions up to and 7 | // including the version specified. 8 | 9 | #endif -------------------------------------------------------------------------------- /Build/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Version.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /AxPipe/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 11 | #define _CRT_RAND_S 12 | 13 | 14 | 15 | // TODO: reference additional headers your program requires here 16 | #include "AxPipe.h" -------------------------------------------------------------------------------- /XecretsFileMessages/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by XecretsFileMessages.rc 4 | // 5 | 6 | // Next default values for new objects 7 | // 8 | #ifdef APSTUDIO_INVOKED 9 | #ifndef APSTUDIO_READONLY_SYMBOLS 10 | #define _APS_NEXT_RESOURCE_VALUE 101 11 | #define _APS_NEXT_COMMAND_VALUE 40001 12 | #define _APS_NEXT_CONTROL_VALUE 1001 13 | #define _APS_NEXT_SYMED_VALUE 101 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /XecretsFileLib/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | #pragma once 6 | 7 | // XecretsFileLib is operating system independent, and Visual Studio 2005 and later have special 8 | // 'secure' replacements for strcpy et. al. - but we want to be independent of such vendor 9 | // specific extensions in this library, so we disable the Visual Studio warnings. 10 | #define _CRT_SECURE_NO_WARNINGS 11 | #define _CRT_RAND_S 12 | -------------------------------------------------------------------------------- /AxWinLib/StdAfx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #define STRICT 11 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 12 | #define OEMRESOURCE 13 | #define INC_OLE2 // Let windows.h include OLE-stuff 14 | #define _CRT_RAND_S 15 | 16 | // TODO: reference additional headers your program requires here 17 | #include 18 | -------------------------------------------------------------------------------- /XecretsFileShellExt/StdAfx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | // This is part of enabling XP Visual Styles in a Shell Extension DLL 11 | #define ISOLATION_AWARE_ENABLED 1 12 | #define _CRT_RAND_S 13 | 14 | // Windows Header Files: 15 | #include 16 | 17 | // TODO: reference additional headers your program requires here 18 | #include "XecretsFileShellExt.h" 19 | -------------------------------------------------------------------------------- /XecretsFileMessages/MessageCompiler.rules: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /SHA-1/sha1.h: -------------------------------------------------------------------------------- 1 | #ifndef _SHA1 2 | #define _SHA1 3 | 4 | #define SHA1HANDSOFF // Svante Seleborg 5 | 6 | typedef struct { 7 | unsigned long state[5]; 8 | unsigned long count[2]; 9 | unsigned char buffer[64]; 10 | #ifdef SHA1HANDSOFF // Svante Seleborg 11 | unsigned char workspace[64]; // Svante Seleborg 12 | #endif // Svante Seleborg 13 | } SHA1_CTX; 14 | 15 | void SHA1Transform(SHA1_CTX* context, unsigned char buffer[64]); 16 | void SHA1Init(SHA1_CTX* context); 17 | void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned int len); 18 | void SHA1Final(unsigned char digest[20], SHA1_CTX* context); 19 | #endif _SHA1 20 | -------------------------------------------------------------------------------- /XecretsFileCommon/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #pragma once 7 | 8 | #include "targetver.h" 9 | 10 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 11 | #define _CRT_RAND_S 12 | 13 | // TODO: reference additional headers your program requires here 14 | #include 15 | #include 16 | 17 | #include 18 | 19 | #include "Oem.h" 20 | #include "AxCommon.h" 21 | #include "Types.h" 22 | #include "CAssert.h" 23 | 24 | #include "XecretsFileTexts.h" -------------------------------------------------------------------------------- /Build/Config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Copyright © 2002-2025 Svante Seleborg/Axantum Software AB. All Rights Reserved. 4 | Axantum Software AB 5 | xecretsfileclassic 6 | GPL Xecrets File Classic 7 | Software\\Axantum\\AxCrypt 8 | AxDecrypt.exe 9 | XecretsFileClassic.exe 10 | Messages.dll 11 | ShellExt.dll 12 | XecretsFileClassic.ico 13 | https://www.axantum.com/ 14 | 15 | -------------------------------------------------------------------------------- /AxPortLib/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows XP. 11 | #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. 12 | #endif 13 | 14 | -------------------------------------------------------------------------------- /XecretsFileCommon/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | #ifndef WINVER 9 | #define WINVER 0x0600 // Allow use of features specific to Windows Vista or later. 10 | #endif 11 | 12 | #ifndef _WIN32_WINNT 13 | #define _WIN32_WINNT 0x0600 // Allow use of features specific to Windows Vista or later. 14 | #endif 15 | 16 | #ifndef _WIN32_IE 17 | #define _WIN32_IE 0x0600 // Specifies that the minimum required platform is Internet Explorer 6.0. 18 | #endif 19 | 20 | -------------------------------------------------------------------------------- /AxDecrypt/RelNotes.txt: -------------------------------------------------------------------------------- 1 | @(#) $Id$ 2 | 3 | 1.6.3 2006-06-16 4 | Minor bug fixes and some OEM-additions. 5 | 6 | 1.6.2.3 2006-02-26 7 | Fixed a bug where it did not run on Windows 98. 8 | 9 | 1.6.2 2006-01-01 10 | See AxCrypt release notes 11 | 12 | 1.5.4 2004-08-28 13 | Simpler dialog for self decryption, and it now runs on NT4. 14 | 15 | 1.5.3 2004-06-28 16 | Save-As dialoge when entering an invalid directory added. More 17 | detailed error messages for system API call errors. Bug with 18 | empty passphrase but key-file fixed. 19 | 20 | 1.5.2 2004-05-05 21 | No actual code changes, recompile after restructuring. 22 | 23 | 1.5.1 2004-03-21 24 | Initial release. Version numbering follows AxCrypt. Supports decryption of AxCrypt-encrypted 25 | files, both as self-decrypting files where the AxCrypt file is appended, and also as a 26 | purely stand-alone program. Only supports English language. Does not modify the registry 27 | or the file system except to store decrypted files. 28 | -------------------------------------------------------------------------------- /XecretsFileClassic/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef WINVER 11 | #define WINVER 0x0600 // Allow use of features specific to Windows Vista or later. 12 | #endif 13 | 14 | #ifndef _WIN32_WINNT 15 | #define _WIN32_WINNT 0x0600 // Allow use of features specific to Windows Vista or later. 16 | #endif 17 | 18 | #ifndef _WIN32_IE 19 | #define _WIN32_IE 0x0600 // Specifies that the minimum required platform is Internet Explorer 6.0. 20 | #endif 21 | -------------------------------------------------------------------------------- /AxWinLib/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef WINVER 11 | #define WINVER 0x0600 // Allow use of features specific to Windows Vista or later. 12 | #endif 13 | 14 | #ifndef _WIN32_WINNT 15 | #define _WIN32_WINNT 0x0600 // Allow use of features specific to Windows Vista or later. 16 | #endif 17 | 18 | #ifndef _WIN32_IE 19 | #define _WIN32_IE 0x0600 // Specifies that the minimum required platform is Internet Explorer 6.0. 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /XecretsFileShellExt/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // The following macros define the minimum required platform. The minimum required platform 4 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 5 | // your application. The macros work by enabling all features available on platform versions up to and 6 | // including the version specified. 7 | 8 | // Modify the following defines if you have to target a platform prior to the ones specified below. 9 | // Refer to MSDN for the latest info on corresponding values for different platforms. 10 | #ifndef WINVER 11 | #define WINVER 0x0600 // Allow use of features specific to Windows Vista or later. 12 | #endif 13 | 14 | #ifndef _WIN32_WINNT 15 | #define _WIN32_WINNT 0x0600 // Allow use of features specific to Windows Vista or later. 16 | #endif 17 | 18 | #ifndef _WIN32_IE 19 | #define _WIN32_IE 0x0600 // Specifies that the minimum required platform is Internet Explorer 6.0. 20 | #endif 21 | -------------------------------------------------------------------------------- /XecretsFileMessages/MessageCompiler.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | Midl 6 | CustomBuild 7 | 8 | 9 | _SelectedFiles;$(MessageCompilerDependsOn) 11 | 12 | 13 | 14 | mc -u -U %(Filename)%(Extension) -r $(IntDir) -h "$(TargetDir)\" 15 | $(TargetDir)%(Filename).h;$(IntDir)%(Filename).rc 16 | Compiling Messages 17 | 18 | 19 | -------------------------------------------------------------------------------- /AxDecrypt/StdAfx.cpp: -------------------------------------------------------------------------------- 1 | /*! \file 2 | \brief AxDecrypt - Stand-alone Xecrets File Classic-decrypter and self-extractor. 3 | 4 | @(#) $Id$ 5 | 6 | AxDecrypt - Stand-alone Xecrets File Classic-decrypter and self-extractor. 7 | 8 | Copyright (C) 2004-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 9 | 10 | This program is free software; you can redistribute it and/or modify it under the terms 11 | of the GNU General Public License as published by the Free Software Foundation; 12 | either version 2 of the License, or (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 15 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along with this program; 19 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 23 | ---- 24 | */ 25 | #include "stdafx.h" -------------------------------------------------------------------------------- /DependencyOrder/ReadMe.txt: -------------------------------------------------------------------------------- 1 | This project is only here to fix an issue with MSBUild / Visual Studio dependency ordering 2 | of projects. 3 | 4 | We have AxDecrypt which references XecretsFileCommon which references XecretsFileMessages. 5 | 6 | XecretsFileMessages must be built before XecretsFileCommon, becuase it produces the XecretsFileTexts.h 7 | header file, needed by XecretsFileCommon. 8 | 9 | The problem is that if we reference XecretsFileMessages from XecretsFileCommon, then Visual Studio or MSBuild 10 | get's the brilliant idea that it must add 'XecretsFileMessages.lib' to the linkage of AxDecrypt. There is 11 | no XecretsFileMessages.lib since it's a dll. I could not find a way to get it to do this right. 12 | 13 | The solution was to have XecretsFileCommon reference this dummy project (which is an .exe, not a .lib) and 14 | then have this project reference XecretsFileMessages. 15 | 16 | This appears to work from Visual Studio and MSBuild command line. 17 | 18 | Just ignore the executable output. 19 | 20 | (TODO - Remove the dependency on XecretsFileMessages from XecretsFileCommon - it won't work anyway since we 21 | don't distribute XecretsFileMessages with AxDecrypt....) 22 | -------------------------------------------------------------------------------- /AxDecrypt/ChangeLog.txt: -------------------------------------------------------------------------------- 1 | @(#) $Id$ 2 | 3 | 1.6.3 2006-06-16 4 | - Chg: Removed version string from 'Help'-dialog [OEM] 5 | - Bug: See AxCrypt change log 6 | 7 | 1.6.2.3 2006-02-26 8 | - Bug: Did not run on Windows 98 9 | 10 | 1.6.2 2006-01-01 11 | - All: See AxCrypt change log 12 | 13 | 1.5.4 2004-08-28 14 | - Bug: Did not run on NT4 due to missing GetLongPathName() there. [BUG 984161] 15 | - Chg: Simplified start dialog with 'More...' button. [RFE 1018128] 16 | 17 | 1.5.3 2004-06-28 18 | - Bug: Entering an invalid directory caused a failed assertion. [BUG 951862] 19 | - Bug: A key-file with an empty passphrase could not be decrypted. [BUG 968144] 20 | - Bug: A potential memory leak fixed. Non-critical. [INTERNAL] 21 | - Bug: Version number reported incorrectly on some OS's. [INTERNAL] 22 | - Chg: Prettier display of names on certain file systems due to short name mapping. [INTERNAL] 23 | - Chg: Updated AxPipe library to 0.9b7, errors include API message texts. [INTERNAL] 24 | - Doc: A very few minor documentation additions to remove doxygen warnings. [INTERNAL] 25 | 26 | 1.5.2 2004-05-05 27 | - Chg: None. Just a recompile. 28 | 29 | 1.5.1 2004-03-21 30 | - New: Initial release. 31 | 32 | -------------------------------------------------------------------------------- /AxSigLib/stdafx.cpp: -------------------------------------------------------------------------------- 1 | /*! \file 2 | \brief AxSigLib - Short Elliptic Curve Digital Signature Algorithm et. al. 3 | 4 | @(#) $Id$ 5 | 6 | Precompiled header generator. 7 | 8 | Copyright (C) 2005-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 9 | 10 | This program is free software; you can redistribute it and/or modify it under the terms 11 | of the GNU General Public License as published by the Free Software Foundation; 12 | either version 2 of the License, or (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 15 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along with this program; 19 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 23 | ---- 24 | */ 25 | 26 | #include "stdafx.h" 27 | 28 | // TODO: reference any additional headers you need in STDAFX.H 29 | // and not in this file -------------------------------------------------------------------------------- /SHA-1/SHA-1.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Source Files 23 | 24 | 25 | 26 | 27 | Header Files 28 | 29 | 30 | -------------------------------------------------------------------------------- /AxPipe/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // When AxPipe is made portable, this Windows-stuff must be moved out of here. It's here right now 4 | // to enable code that uses AxPipe to "appear" portable, in that that code at least does not need to 5 | // define and include all this. 6 | 7 | // The following macros define the minimum required platform. The minimum required platform 8 | // is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run 9 | // your application. The macros work by enabling all features available on platform versions up to and 10 | // including the version specified. 11 | 12 | // Modify the following defines if you have to target a platform prior to the ones specified below. 13 | // Refer to MSDN for the latest info on corresponding values for different platforms. 14 | #ifndef WINVER 15 | #define WINVER 0x0600 // Allow use of features specific to Windows Vista or later. 16 | #endif 17 | 18 | #ifndef _WIN32_WINNT 19 | #define _WIN32_WINNT 0x0600 // Allow use of features specific to Windows Vista or later. 20 | #endif 21 | 22 | #ifndef _WIN32_IE 23 | #define _WIN32_IE 0x0600 // Specifies that the minimum required platform is Internet Explorer 6.0. 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /AES/AES.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Source Files 23 | 24 | 25 | 26 | 27 | Header Files 28 | 29 | 30 | -------------------------------------------------------------------------------- /AxSigLib/AxSigLib.h: -------------------------------------------------------------------------------- 1 | #ifndef AXSIGLIB_AXSIGLIB_H 2 | #define AXSIGLIB_AXSIGLIB_H 3 | /*! \file 4 | \brief AxSigLib - Main include file 5 | 6 | @(#) $Id$ 7 | 8 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 9 | 10 | This program is free software; you can redistribute it and/or modify it under the terms 11 | of the GNU General Public License as published by the Free Software Foundation; 12 | either version 2 of the License, or (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 15 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along with this program; 19 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 23 | --- 24 | */ 25 | 26 | #include "../AxPortLib/ttchar.h" 27 | #include "../AxPortLib/strcvt.h" 28 | #include "../AxPortLib/ttstring.h" 29 | 30 | using namespace std; 31 | using namespace axpl; 32 | 33 | #endif -------------------------------------------------------------------------------- /XecretsFileClassic/DlgLicense.h: -------------------------------------------------------------------------------- 1 | #ifndef DLGLICENSE_H 2 | #define DLGLICENSE_H 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2004-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | CLicMgr.h Manage licenses 26 | */ 27 | 28 | extern ttstringpair GetLicenseeSignature(HWND hWnd); 29 | #endif -------------------------------------------------------------------------------- /XecretsFileClassic/DlgRegistration.h: -------------------------------------------------------------------------------- 1 | #ifndef DLGREGISTRATION_H 2 | #define DLGREGISTRATION_H 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2009-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | CLicMgr.h Manage licenses 26 | */ 27 | 28 | extern void AskForRegistration(HWND hWnd, std::wstring& sVersion); 29 | #endif -------------------------------------------------------------------------------- /AxWinLib/GetModuleFilename.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | 3 | #define WIN32_LEAN_AND_MEAN ///< Exclude rarely-used stuff from Windows headers 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | /// \brief Get an allocated buffer with the fully qualified name of a module 10 | /// Get the fully qualified name of a module, but ensure that 11 | /// that it's in a dynamically allocated buffer of sufficient 12 | /// size. I see no real alterantive to the cut and try method 13 | /// below. Aargh. 14 | /// \param hModule The module handle or NULL for the current program 15 | /// \return An allocated buffer that needs to be free()'d. It may be NULL on error. 16 | _TCHAR *MyGetModuleFileName(HMODULE hModule) { 17 | size_t cbFileName = 0; 18 | _TCHAR *szFileName = NULL; 19 | size_t cbLen; 20 | do { 21 | _TCHAR *t = (_TCHAR *)realloc(szFileName, (cbFileName += MAX_PATH) * sizeof _TCHAR); 22 | if (!t) { 23 | free(szFileName); 24 | return NULL; 25 | } 26 | szFileName = t; 27 | cbLen = GetModuleFileName(hModule, szFileName, (DWORD)cbFileName); 28 | if (!cbLen) { 29 | free(szFileName); 30 | return NULL; 31 | } 32 | } while (cbLen >= (cbFileName - 1)); 33 | return szFileName; 34 | } -------------------------------------------------------------------------------- /XecretsFileCommon/Oem.h: -------------------------------------------------------------------------------- 1 | #ifndef _AXOEM 2 | #define _AXOEM 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2012-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | Oem.h Name definitions etc 26 | */ 27 | 28 | #define AXPRODUCTFILENAME L"XecretsFileClassic" 29 | #define AXENCRYPTEDFILEEXT L".axx" 30 | 31 | #endif _AXOEM -------------------------------------------------------------------------------- /AxSigLib/Base34.h: -------------------------------------------------------------------------------- 1 | #ifndef AXSIGLIB_BASE34_H 2 | #define AXSIGLIB_BASE34_H 3 | /*! \file 4 | \brief AxSigLib - Short Elliptic Curve Digital Signature Algorithm et. al. 5 | 6 | @(#) $Id$ 7 | 8 | Encoding vectors for Base34. 9 | 10 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 11 | 12 | This program is free software; you can redistribute it and/or modify it under the terms 13 | of the GNU General Public License as published by the Free Software Foundation; 14 | either version 2 of the License, or (at your option) any later version. 15 | 16 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 17 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | See the GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License along with this program; 21 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 22 | Boston, MA 02111-1307 USA 23 | 24 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 25 | --- 26 | */ 27 | 28 | #include "BaseM.h" 29 | 30 | static const byte s_vecUpper[] = "ABCDEFGHIJKLMNPQRSTUVWXYZ123456789"; 31 | static const byte s_vecLower[] = "abcdefghijklmnpqrstuvwxyz123456789"; 32 | 33 | #endif -------------------------------------------------------------------------------- /AES/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | STATIC LIBRARY : AES Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this AES library project for you. 6 | 7 | No source files were created as part of your project. 8 | 9 | 10 | AES.vcxproj 11 | This is the main project file for VC++ projects generated using an Application Wizard. 12 | It contains information about the version of Visual C++ that generated the file, and 13 | information about the platforms, configurations, and project features selected with the 14 | Application Wizard. 15 | 16 | AES.vcxproj.filters 17 | This is the filters file for VC++ projects generated using an Application Wizard. 18 | It contains information about the association between the files in your project 19 | and the filters. This association is used in the IDE to show grouping of files with 20 | similar extensions under a specific node (for e.g. ".cpp" files are associated with the 21 | "Source Files" filter). 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | Other notes: 25 | 26 | AppWizard uses "TODO:" comments to indicate parts of the source code you 27 | should add to or customize. 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | -------------------------------------------------------------------------------- /SHA-1/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | STATIC LIBRARY : SHA-1 Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this SHA-1 library project for you. 6 | 7 | No source files were created as part of your project. 8 | 9 | 10 | SHA-1.vcxproj 11 | This is the main project file for VC++ projects generated using an Application Wizard. 12 | It contains information about the version of Visual C++ that generated the file, and 13 | information about the platforms, configurations, and project features selected with the 14 | Application Wizard. 15 | 16 | SHA-1.vcxproj.filters 17 | This is the filters file for VC++ projects generated using an Application Wizard. 18 | It contains information about the association between the files in your project 19 | and the filters. This association is used in the IDE to show grouping of files with 20 | similar extensions under a specific node (for e.g. ".cpp" files are associated with the 21 | "Source Files" filter). 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | Other notes: 25 | 26 | AppWizard uses "TODO:" comments to indicate parts of the source code you 27 | should add to or customize. 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | -------------------------------------------------------------------------------- /AxPipe/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | STATIC LIBRARY : AxPipe Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this AxPipe library project for you. 6 | 7 | No source files were created as part of your project. 8 | 9 | 10 | AxPipe.vcxproj 11 | This is the main project file for VC++ projects generated using an Application Wizard. 12 | It contains information about the version of Visual C++ that generated the file, and 13 | information about the platforms, configurations, and project features selected with the 14 | Application Wizard. 15 | 16 | AxPipe.vcxproj.filters 17 | This is the filters file for VC++ projects generated using an Application Wizard. 18 | It contains information about the association between the files in your project 19 | and the filters. This association is used in the IDE to show grouping of files with 20 | similar extensions under a specific node (for e.g. ".cpp" files are associated with the 21 | "Source Files" filter). 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | Other notes: 25 | 26 | AppWizard uses "TODO:" comments to indicate parts of the source code you 27 | should add to or customize. 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | -------------------------------------------------------------------------------- /XecretsFileShellExt/XecretsFileShellExt.manifest.Win32: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | Xecrets File Classic - Axantum Shell Extension 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /XecretsFileShellExt/XecretsFileShellExt.manifest.x64: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | Xecrets File Classic - Axantum Shell Extension 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /AxSigLib/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | STATIC LIBRARY : AxSigLib Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this AxSigLib library project for you. 6 | 7 | No source files were created as part of your project. 8 | 9 | 10 | AxSigLib.vcxproj 11 | This is the main project file for VC++ projects generated using an Application Wizard. 12 | It contains information about the version of Visual C++ that generated the file, and 13 | information about the platforms, configurations, and project features selected with the 14 | Application Wizard. 15 | 16 | AxSigLib.vcxproj.filters 17 | This is the filters file for VC++ projects generated using an Application Wizard. 18 | It contains information about the association between the files in your project 19 | and the filters. This association is used in the IDE to show grouping of files with 20 | similar extensions under a specific node (for e.g. ".cpp" files are associated with the 21 | "Source Files" filter). 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | Other notes: 25 | 26 | AppWizard uses "TODO:" comments to indicate parts of the source code you 27 | should add to or customize. 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | -------------------------------------------------------------------------------- /AxWinLib/IStaticHyperlink.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /*! \file 3 | \brief Create static hyper link in dialogbox 4 | 5 | @(#) $Id$ 6 | 7 | Copyright (C) 2009-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 8 | 9 | This program is free software; you can redistribute it and/or modify it under the terms 10 | of the GNU General Public License as published by the Free Software Foundation; 11 | either version 2 of the License, or (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 14 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | See the GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License along with this program; 18 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 19 | Boston, MA 02111-1307 USA 20 | 21 | The author may be reached at mailto:svante@axantum.com and http://wwww.axantum.com 22 | ---- 23 | IStaticHyperlink.h 24 | */ 25 | namespace awl { 26 | class IStaticHyperlink { 27 | public: 28 | static IStaticHyperlink& GetInstance(); 29 | virtual bool EnableHyperlink(HWND hWndControl) = 0; 30 | virtual ~IStaticHyperlink() = 0; 31 | }; 32 | 33 | BOOL ConvertStaticToHyperlink(HWND hwndCtl); 34 | BOOL ConvertStaticToHyperlink(HWND hwndParent, UINT uiCtlId); 35 | } 36 | -------------------------------------------------------------------------------- /AxWinLib/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | STATIC LIBRARY : AxWinLib Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this AxWinLib library project for you. 6 | 7 | No source files were created as part of your project. 8 | 9 | 10 | AxWinLib.vcxproj 11 | This is the main project file for VC++ projects generated using an Application Wizard. 12 | It contains information about the version of Visual C++ that generated the file, and 13 | information about the platforms, configurations, and project features selected with the 14 | Application Wizard. 15 | 16 | AxWinLib.vcxproj.filters 17 | This is the filters file for VC++ projects generated using an Application Wizard. 18 | It contains information about the association between the files in your project 19 | and the filters. This association is used in the IDE to show grouping of files with 20 | similar extensions under a specific node (for e.g. ".cpp" files are associated with the 21 | "Source Files" filter). 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | Other notes: 25 | 26 | AppWizard uses "TODO:" comments to indicate parts of the source code you 27 | should add to or customize. 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | -------------------------------------------------------------------------------- /AxPortLib/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | STATIC LIBRARY : AxPortLib Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this AxPortLib library project for you. 6 | 7 | No source files were created as part of your project. 8 | 9 | 10 | AxPortLib.vcxproj 11 | This is the main project file for VC++ projects generated using an Application Wizard. 12 | It contains information about the version of Visual C++ that generated the file, and 13 | information about the platforms, configurations, and project features selected with the 14 | Application Wizard. 15 | 16 | AxPortLib.vcxproj.filters 17 | This is the filters file for VC++ projects generated using an Application Wizard. 18 | It contains information about the association between the files in your project 19 | and the filters. This association is used in the IDE to show grouping of files with 20 | similar extensions under a specific node (for e.g. ".cpp" files are associated with the 21 | "Source Files" filter). 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | Other notes: 25 | 26 | AppWizard uses "TODO:" comments to indicate parts of the source code you 27 | should add to or customize. 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | -------------------------------------------------------------------------------- /XecretsFileLib/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | STATIC LIBRARY : XecretsFileLib Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this XecretsFileLib library project for you. 6 | 7 | No source files were created as part of your project. 8 | 9 | 10 | XecretsFileLib.vcxproj 11 | This is the main project file for VC++ projects generated using an Application Wizard. 12 | It contains information about the version of Visual C++ that generated the file, and 13 | information about the platforms, configurations, and project features selected with the 14 | Application Wizard. 15 | 16 | XecretsFileLib.vcxproj.filters 17 | This is the filters file for VC++ projects generated using an Application Wizard. 18 | It contains information about the association between the files in your project 19 | and the filters. This association is used in the IDE to show grouping of files with 20 | similar extensions under a specific node (for e.g. ".cpp" files are associated with the 21 | "Source Files" filter). 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | Other notes: 25 | 26 | AppWizard uses "TODO:" comments to indicate parts of the source code you 27 | should add to or customize. 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | -------------------------------------------------------------------------------- /XecretsFileCommon/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | STATIC LIBRARY : XecretsFileCommon Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this XecretsFileCommon library project for you. 6 | 7 | No source files were created as part of your project. 8 | 9 | 10 | XecretsFileCommon.vcxproj 11 | This is the main project file for VC++ projects generated using an Application Wizard. 12 | It contains information about the version of Visual C++ that generated the file, and 13 | information about the platforms, configurations, and project features selected with the 14 | Application Wizard. 15 | 16 | XecretsFileCommon.vcxproj.filters 17 | This is the filters file for VC++ projects generated using an Application Wizard. 18 | It contains information about the association between the files in your project 19 | and the filters. This association is used in the IDE to show grouping of files with 20 | similar extensions under a specific node (for e.g. ".cpp" files are associated with the 21 | "Source Files" filter). 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | Other notes: 25 | 26 | AppWizard uses "TODO:" comments to indicate parts of the source code you 27 | should add to or customize. 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | -------------------------------------------------------------------------------- /XecretsFileWinLib/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | STATIC LIBRARY : XecretsFileWinLib Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this XecretsFileWinLib library project for you. 6 | 7 | No source files were created as part of your project. 8 | 9 | 10 | XecretsFileWinLib.vcxproj 11 | This is the main project file for VC++ projects generated using an Application Wizard. 12 | It contains information about the version of Visual C++ that generated the file, and 13 | information about the platforms, configurations, and project features selected with the 14 | Application Wizard. 15 | 16 | XecretsFileWinLib.vcxproj.filters 17 | This is the filters file for VC++ projects generated using an Application Wizard. 18 | It contains information about the association between the files in your project 19 | and the filters. This association is used in the IDE to show grouping of files with 20 | similar extensions under a specific node (for e.g. ".cpp" files are associated with the 21 | "Source Files" filter). 22 | 23 | ///////////////////////////////////////////////////////////////////////////// 24 | Other notes: 25 | 26 | AppWizard uses "TODO:" comments to indicate parts of the source code you 27 | should add to or customize. 28 | 29 | ///////////////////////////////////////////////////////////////////////////// 30 | -------------------------------------------------------------------------------- /AxPipe/stdafx.cpp: -------------------------------------------------------------------------------- 1 | /*! \file 2 | \brief Standard Visual Studio Precompiled Header generator 3 | 4 | @(#) $Id$ 5 | 6 | AxPipe - Binary Stream Framework 7 | 8 | Copyright (C) 2003-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 9 | 10 | This program is free software; you can redistribute it and/or modify it under the terms 11 | of the GNU General Public License as published by the Free Software Foundation; 12 | either version 2 of the License, or (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 15 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along with this program; 19 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | The author may be reached at mailto:axpipe@axondata.se and http://axpipe.sourceforge.net 23 | 24 | Why is this framework released as GPL and not LGPL? See http://www.gnu.org/philosophy/why-not-lgpl.html 25 | 26 | ---- 27 | \verbatim 28 | stdafx.cpp Standard Visual Studio Precompiled Header generator 29 | 30 | E-mail YYYY-MM-DD Reason 31 | axpipe@axondata.se 2003-11-23 Initial 32 | \endverbatim 33 | */ 34 | #include "stdafx.h" -------------------------------------------------------------------------------- /XecretsFileShellExt/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | DYNAMIC LINK LIBRARY : XecretsFileShellExt Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this XecretsFileShellExt DLL for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your XecretsFileShellExt application. 9 | 10 | 11 | XecretsFileShellExt.vcproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | XecretsFileShellExt.cpp 18 | This is the main DLL source file. 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | Other standard files: 22 | 23 | StdAfx.h, StdAfx.cpp 24 | These files are used to build a precompiled header (PCH) file 25 | named XecretsFileShellExt.pch and a precompiled types file named StdAfx.obj. 26 | 27 | ///////////////////////////////////////////////////////////////////////////// 28 | Other notes: 29 | 30 | AppWizard uses "TODO:" comments to indicate parts of the source code you 31 | should add to or customize. 32 | 33 | ///////////////////////////////////////////////////////////////////////////// 34 | -------------------------------------------------------------------------------- /XecretsFileClassic/CSha1.h: -------------------------------------------------------------------------------- 1 | #ifndef _CSHA1 2 | #define _CSHA1 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | CSha1.h Special purpose wrapper for Steve Reids SHA-1 code. 26 | 27 | E-mail YYYY-MM-DD Reason 28 | support@axantum.com 2001 Initial 29 | 30 | */ 31 | extern "C" { 32 | #include "../SHA-1/sha1.h" 33 | } 34 | 35 | class CSha1 { 36 | SHA1_CTX* m_putContext; 37 | public: 38 | CSha1(); 39 | ~CSha1(); 40 | TKey* GetKeyHash(BYTE* poMsg, size_t iLen, TCHAR* szFileName = NULL); 41 | }; 42 | #endif _CSHA1 -------------------------------------------------------------------------------- /XecretsFileCommon/XecretsFileGUID.h: -------------------------------------------------------------------------------- 1 | /* 2 | @(#) $Id$ 3 | 4 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 5 | Server or Web Storage of Document Files. 6 | 7 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 8 | 9 | This program is free software; you can redistribute it and/or modify it under the terms 10 | of the GNU General Public License as published by the Free Software Foundation; 11 | either version 2 of the License, or (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 14 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | See the GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License along with this program; 18 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 19 | Boston, MA 02111-1307 USA 20 | 21 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 22 | ---- 23 | XecretsFileGUID.h The name says it all. 24 | 25 | E-mail YYYY-MM-DD Reason 26 | support@axantum.com 2001 Initial 27 | 28 | */ 29 | // 30 | // The XECRETS FILE GUID, this is _ONLY_ used to mark the file header! 31 | // 32 | // 2E07B9C0-934F-46F1-A015-792CA1D9E821 33 | // 34 | DEFINE_GUID(guidAxCryptFileId, 35 | 0x2e07b9c0, 36 | 0x934f, 37 | 0x46f1, 38 | 0xa0, 0x15, 0x79, 0x2c, 0xa1, 0xd9, 0xe8, 0x21 39 | ); -------------------------------------------------------------------------------- /XecretsFileShellExt/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by XecretsFileShellExt.rc 4 | // 5 | #define MANIFEST_RESOURCE_ID 2 6 | #define IDD_DIALOG1 101 7 | #define IDD_PROPSHEETPAGE 101 8 | #define IDD_PROGRESS 103 9 | #define IDD_BRUTEFORCE 104 10 | #define IDD_ABOUT 106 11 | #define IDB_XECRETSFILE 107 12 | #define IDC_ABOUT 1000 13 | #define IDC_ENC_LEAD 1001 14 | #define IDC_COMP_LEAD 1002 15 | #define IDC_AUTH_LEAD 1003 16 | #define IDC_ENC 1004 17 | #define IDC_COMP 1005 18 | #define IDC_AUTH 1006 19 | #define IDC_ABOUT_GROUP 1007 20 | #define IDC_RAND_LEAD 1008 21 | #define IDC_BRUTEFORCE 1008 22 | #define IDC_RAND 1009 23 | #define IDC_LISTABOUT 1009 24 | #define IDC_BTN_NOTIFY 1010 25 | #define IDC_BTN_DOCS 1011 26 | #define IDC_INF_ABOUT 1013 27 | 28 | // Next default values for new objects 29 | // 30 | #ifdef APSTUDIO_INVOKED 31 | #ifndef APSTUDIO_READONLY_SYMBOLS 32 | #define _APS_NEXT_RESOURCE_VALUE 108 33 | #define _APS_NEXT_COMMAND_VALUE 40001 34 | #define _APS_NEXT_CONTROL_VALUE 1015 35 | #define _APS_NEXT_SYMED_VALUE 101 36 | #endif 37 | #endif 38 | -------------------------------------------------------------------------------- /AxWinLib/VistaOrLater.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /*! \file 3 | \brief Support routines for Vista or later 4 | 5 | @(#) $Id$ 6 | 7 | Various things that are special for Vista or later 8 | 9 | Copyright (C) 2006-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:svante@axantum.com and http://wwww.axantum.com 24 | ---- 25 | VistaOrLater.h 26 | */ 27 | namespace awl { 28 | extern bool IsVistaOrLater(); ///< Determine if we're running Vista or later 29 | extern bool NeedsAndCanElevateOnVista(); ///< Determine if we need and can elevate to admin rights 30 | extern bool IsAdminOnVista(); ///< Are we running as admin one way or another on Vista? 31 | extern bool RelaunchElevatedOnVista(DWORD* pdwReturnCode, HWND hWnd = NULL, int nShowCmd = SW_SHOWNORMAL); ///< Actually elevate on Vista 32 | } 33 | -------------------------------------------------------------------------------- /AxSigLib/stdafx.h: -------------------------------------------------------------------------------- 1 | #ifndef AXSIGLIB_STDAFX_H 2 | #define AXSIGLIB_STDAFX_H 3 | /*! \file 4 | \brief AxSigLib - Short Elliptic Curve Digital Signature Algorithm et. al. 5 | 6 | @(#) $Id$ 7 | 8 | Common includes for the library. 9 | 10 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 11 | 12 | This program is free software; you can redistribute it and/or modify it under the terms 13 | of the GNU General Public License as published by the Free Software Foundation; 14 | either version 2 of the License, or (at your option) any later version. 15 | 16 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 17 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | See the GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License along with this program; 21 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 22 | Boston, MA 02111-1307 USA 23 | 24 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 25 | --- 26 | */ 27 | 28 | #include "targetver.h" 29 | 30 | #ifdef _MSC_VER 31 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 32 | #endif 33 | 34 | // TODO: reference additional headers your program requires here 35 | #ifdef _MSC_VER 36 | #include 37 | #endif 38 | 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | 45 | #include "AxSigLib.h" 46 | 47 | #endif -------------------------------------------------------------------------------- /Build/Version.h.template: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #ifndef VERSION_MAJOR 3 | #define VERSION_MAJOR ${Major} 4 | #endif 5 | #ifndef VERSION_MINOR 6 | #define VERSION_MINOR ${Minor} 7 | #endif 8 | #ifndef VERSION_BUILD 9 | #define VERSION_BUILD ${Build} 10 | #endif 11 | #ifndef VERSION_REVISION 12 | #define VERSION_REVISION ${Revision} 13 | #endif 14 | #ifndef VERSION_PRODUCTNAME_VALUE 15 | #define VERSION_PRODUCTNAME_VALUE "${ProductName}" 16 | #endif 17 | #ifndef VERSION_COMPANYNAME_VALUE 18 | #define VERSION_COMPANYNAME_VALUE "${CompanyName}" 19 | #endif 20 | #ifndef VERSION_LEGALCOPYRIGHT_VALUE 21 | #define VERSION_LEGALCOPYRIGHT_VALUE "${Copyright}" 22 | #endif 23 | #ifndef VERSION_LEGALTRADEMARK_VALUE 24 | #define VERSION_LEGALTRADEMARK_VALUE "${Trademark}" 25 | #endif 26 | #ifndef VERSION_VALUE 27 | #define VERSION_VALUE "${Major}.${Minor}.${Build}.${Revision}" 28 | #endif 29 | #ifndef BINARY_VERSION 30 | #define BINARY_VERSION ${Major},${Minor},${Build},${Revision} 31 | #endif 32 | #ifndef VERSION_FILEVERSION 33 | #define VERSION_FILEVERSION BINARY_VERSION 34 | #endif 35 | #ifndef VERSION_PRODUCTVERSION 36 | #define VERSION_PRODUCTVERSION BINARY_VERSION 37 | #endif 38 | #ifndef VERSION_FILEVERSION_VALUE 39 | #define VERSION_FILEVERSION_VALUE VERSION_VALUE 40 | #endif 41 | #ifndef VERSION_PRODUCTVERSION_VALUE 42 | #define VERSION_PRODUCTVERSION_VALUE VERSION_VALUE 43 | #endif 44 | #ifndef VERSION_PROJECT_SPECIAL_BUILD_VALUE 45 | #define VERSION_PROJECT_SPECIAL_BUILD_VALUE "${SpecialBuild}" 46 | #endif 47 | #ifndef VERSION_PROJECT_SPECIAL_BUILD 48 | #define VERSION_PROJECT_SPECIAL_BUILD ${SpecialBuildDefined} 49 | #endif 50 | -------------------------------------------------------------------------------- /AxPortLib/ttchar.h: -------------------------------------------------------------------------------- 1 | #ifndef AXPORTLIB_TTCHAR_H 2 | #define AXPORTLIB_TTCHAR_H 3 | /*! \file 4 | \brief AxPortLib - Windows-like TCHAR definitions, but with double TT instead to differentiated. 5 | 6 | @(#) $Id$ 7 | 8 | Copyright (C) 2008-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 9 | 10 | This program is free software; you can redistribute it and/or modify it under the terms 11 | of the GNU General Public License as published by the Free Software Foundation; 12 | either version 2 of the License, or (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 15 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along with this program; 19 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 23 | --- 24 | */ 25 | 26 | #include "strcvt.h" 27 | 28 | // A few Windows syntax-compatible definitions for Unicode/Non-Unicode builds 29 | // Because it's not possible to be compatible with tchar.h for the definition of _T 30 | // this code uses _TT instead. 31 | #ifndef _TT 32 | #ifdef _T 33 | #define _TT _T 34 | #else 35 | #if defined(_UNICODE) || defined(UNICODE) 36 | #define _TT(x) L ## x 37 | #else 38 | #define _TT(x) x 39 | #endif // _UNICODE || UNICODE 40 | #endif // _T 41 | #endif // _TT 42 | 43 | #endif -------------------------------------------------------------------------------- /AxWinLib/DynLoadString.cpp: -------------------------------------------------------------------------------- 1 | #include "StdAfx.h" 2 | 3 | #if _MSC_VER > 1000 4 | #pragma once 5 | #endif // _MSC_VER > 1000 6 | 7 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 8 | 9 | // Windows Header Files: 10 | #include 11 | #include 12 | 13 | // C RunTime Header Files 14 | #include 15 | #include 16 | #include 17 | 18 | /// \brief Support routine. Get an allocated string from a resource string table. 19 | /// 20 | /// Get a string from a string table, but ensure that 21 | /// that it's in a dynamically allocated buffer of sufficient 22 | /// size. I see no real alterantive to the cut and try method 23 | /// below. Aargh. 24 | /// \param uId The string resource ID 25 | /// \param hModule The module handle to use. Default is NULL to use the calling exe 26 | /// \return An allocated string or NULL on error. Do remember to free. 27 | _TCHAR * 28 | DynLoadString(UINT uId, HMODULE hModule = NULL) { 29 | if (!hModule) hModule = GetModuleHandle(NULL); // Default to calling exe 30 | size_t cbString = 0; 31 | _TCHAR *szString = NULL; 32 | DWORD dwLen; 33 | do { 34 | _TCHAR *t = (_TCHAR *)realloc(szString, (cbString += 50) * sizeof _TCHAR); 35 | if (!t) { 36 | free(szString); 37 | return NULL; 38 | } 39 | szString = t; 40 | dwLen = LoadString(hModule, uId, szString, (int)cbString); 41 | if (!dwLen) { 42 | free(szString); 43 | return NULL; 44 | } 45 | } while (dwLen >= (cbString - 1)); 46 | return szString; 47 | } 48 | -------------------------------------------------------------------------------- /AxPortLib/AxPortLib.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Source Files 23 | 24 | 25 | 26 | 27 | Header Files 28 | 29 | 30 | Header Files 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | -------------------------------------------------------------------------------- /XecretsFileMessages/XecretsFileMessages.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Resource Files 20 | 21 | 22 | 23 | 24 | Header Files 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | Source Files 37 | 38 | 39 | -------------------------------------------------------------------------------- /AxWinLib/IDocumentAppLaunch.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /*! \file 3 | \brief Implement launch-and-wait functionality for a document. 4 | 5 | @(#) $Id$ 6 | 7 | Given a document path, launch an associated application, and do not return until the application is 8 | done with the document. 9 | 10 | Copyright (C) 2008-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 11 | 12 | This program is free software; you can redistribute it and/or modify it under the terms 13 | of the GNU General Public License as published by the Free Software Foundation; 14 | either version 2 of the License, or (at your option) any later version. 15 | 16 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 17 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | See the GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License along with this program; 21 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 22 | Boston, MA 02111-1307 USA 23 | 24 | The author may be reached at mailto:svante@axantum.com and http://wwww.axantum.com 25 | ---- 26 | IDocumentAppLaunch.h 27 | */ 28 | 29 | namespace awl { 30 | class IDocumentAppLaunch { 31 | public: 32 | static IDocumentAppLaunch* New(); ///< Create an instance of CDocumentAppLaunch 33 | virtual bool LaunchAndWait(const wchar_t* wzDocumentPath) = 0; ///< Launch the app. Return true if all went well. 34 | virtual const wchar_t* ErrorMessage(); ///< If an error, an error message is kept here. 35 | virtual ~IDocumentAppLaunch() = 0; 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /AxSigLib/Base34Enc.h: -------------------------------------------------------------------------------- 1 | #ifndef AXSIGLIB_BASE34ENC_H 2 | #define AXSIGLIB_BASE34ENC_H 3 | /*! \file 4 | \brief AxSigLib - Short Elliptic Curve Digital Signature Algorithm et. al. 5 | 6 | @(#) $Id$ 7 | 8 | Encode Base34 strings. These are strings using A-N, P-Z, 1-9 as their digits, 9 | valued in that sequence, i.e. A is zero, 9 is thirty-two. 10 | 11 | Copyright (C) 2005-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 12 | 13 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 14 | ---- 15 | */ 16 | 17 | #include "Base34.h" 18 | #include "BaseMEnc.h" 19 | 20 | //! Converts given data to base 34 (a-z, 1-9, excluding the letter 'o' and the digit '0'). 21 | class Base34Encoder : public SimpleProxyFilter { 22 | public: 23 | Base34Encoder(BufferedTransformation* attachment = NULL, int bits = 0, bool uppercase = true, int outputGroupSize = 0, const std::string& separator = ":", const std::string& terminator = "") 24 | : SimpleProxyFilter(new BaseM_Encoder(new Grouper), attachment) { 25 | IsolatedInitialize(MakeParameters(Name::Uppercase(), uppercase) 26 | (Name::GroupSize(), outputGroupSize) 27 | (Name::BitPrecision(), bits) 28 | (Name::Separator(), ConstByteArrayParameter(separator))); 29 | } 30 | 31 | void IsolatedInitialize(const NameValuePairs& parameters); 32 | }; 33 | 34 | void Base34Encoder::IsolatedInitialize(const NameValuePairs& parameters) { 35 | bool uppercase = parameters.GetValueWithDefault(Name::Uppercase(), true); 36 | m_filter->Initialize(CombinedNameValuePairs( 37 | parameters, 38 | MakeParameters(Name::EncodingLookupArray(), uppercase ? &s_vecUpper[0] : &s_vecLower[0], false)(Name::AnyBase(), 34, true))); 39 | } 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /XecretsFile2Go/CDialogs.h: -------------------------------------------------------------------------------- 1 | #ifndef CDIALOGS_H 2 | #define CDIALOGS_H 3 | /*! \file 4 | \brief CDialogs.h - Various support for dialogs 5 | 6 | @(#) $Id$ 7 | 8 | */ 9 | /*! \page License CDialogs.h - Various dialogs for XecretsFile2Go 10 | 11 | Copyright (C) 2005-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 12 | 13 | This program is free software; you can redistribute it and/or modify it under the terms 14 | of the GNU General Public License as published by the Free Software Foundation; 15 | either version 2 of the License, or (at your option) any later version. 16 | 17 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 18 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License along with this program; 22 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 23 | Boston, MA 02111-1307 USA 24 | 25 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 26 | ---- 27 | */ 28 | #include "../XecretsFileLib/CXecretsFileLib.h" 29 | 30 | #include "../AxWinLib/AxAssert.h" 31 | #define AXLIB_ASSERT_FILE "CDialogs.h" 32 | 33 | class CPassphraseChars { 34 | protected: 35 | axcl::CXecretsFileLib* m_pXecretsFileLib; 36 | 37 | protected: 38 | static const char m_szPassphraseChars[]; 39 | 40 | public: 41 | CPassphraseChars(axcl::CXecretsFileLib* pXecretsFileLib) { 42 | m_pXecretsFileLib = pXecretsFileLib; 43 | } 44 | 45 | public: 46 | CPassphraseChars() { 47 | m_pXecretsFileLib = NULL; 48 | } 49 | }; 50 | 51 | #endif CDIALOGSWIN_H -------------------------------------------------------------------------------- /AxSigLib/Base34Dec.h: -------------------------------------------------------------------------------- 1 | #ifndef AXSIGLIB_BASE34DEC_H 2 | #define AXSIGLIB_BASE34DEC_H 3 | /*! \file 4 | \brief AxSigLib - Short Elliptic Curve Digital Signature Algorithm et. al. 5 | 6 | @(#) $Id$ 7 | 8 | Decode Base34 strings. These are strings using A-N, P-Z, 1-9 as their digits, 9 | valued in that sequence, i.e. A is zero, 9 is thirty-two. 10 | 11 | Copyright (C) 2005-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 12 | 13 | This program is free software; you can redistribute it and/or modify it under the terms 14 | of the GNU General Public License as published by the Free Software Foundation; 15 | either version 2 of the License, or (at your option) any later version. 16 | 17 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 18 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 19 | See the GNU General Public License for more details. 20 | 21 | You should have received a copy of the GNU General Public License along with this program; 22 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 23 | Boston, MA 02111-1307 USA 24 | 25 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 26 | ---- 27 | */ 28 | 29 | #include "Base34.h" 30 | #include "BaseMDec.h" 31 | 32 | //! Decode base 34 data back to bytes 33 | class CRYPTOPP_DLL Base34Decoder : public BaseM_Decoder { 34 | public: 35 | Base34Decoder(int bits = 0, BufferedTransformation* attachment = NULL) 36 | : BaseM_Decoder(GetDefaultDecodingLookupArray(), 34, bits, attachment) { 37 | } 38 | 39 | void IsolatedInitialize(const NameValuePairs& parameters); 40 | 41 | private: 42 | static const int* GetDefaultDecodingLookupArray(); 43 | }; 44 | 45 | #endif -------------------------------------------------------------------------------- /AxWinLib/IWinVersion.h: -------------------------------------------------------------------------------- 1 | #ifndef AXLIB_CWINVERSION 2 | #define AXLIB_CWINVERSION 3 | /*! \file 4 | \brief Determine Windows Version 5 | 6 | @(#) $Id$ 7 | 8 | Copyright (C) 2009-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 9 | 10 | This program is free software; you can redistribute it and/or modify it under the terms 11 | of the GNU General Public License as published by the Free Software Foundation; 12 | either version 2 of the License, or (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 15 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along with this program; 19 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 23 | ---- 24 | CWinVersion.h 25 | 26 | E-mail YYYY-MM-DD Reason 27 | support@axantum.com 2009-08-19 Initial 28 | 29 | */ 30 | namespace AxLib { 31 | enum WINVERSION { 32 | WINXX, 33 | WIN95, 34 | WIN98, 35 | WINME, 36 | NT3, 37 | NT4, 38 | WIN2K, 39 | WINXP, 40 | W2003, 41 | WINVISTA, 42 | WIN2008, 43 | WIN7, 44 | WINHS, 45 | WIN8, 46 | WIN2012, 47 | WIN10, 48 | WIN2016, 49 | X64 = 128, 50 | }; 51 | 52 | /// \brief Determine Windows Version 53 | /// 54 | /// Determine Windows Version and bit-ness etc. 55 | class IWinVersion { 56 | public: 57 | static IWinVersion* New(); 58 | virtual int GetVersion() = 0; 59 | virtual ~IWinVersion() = 0; 60 | }; 61 | } 62 | #endif -------------------------------------------------------------------------------- /XecretsFileClassic/Dialog.h: -------------------------------------------------------------------------------- 1 | #ifndef _DIALOG 2 | #define _DIALOG 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | Dialog.h Secure dialog procedures, handling password entry etc. 26 | 27 | E-mail YYYY-MM-DD Reason 28 | support@axantum.com 2001 Initial 29 | 30 | */ 31 | #include 32 | using namespace std; 33 | 34 | // Get the dialog title bar to use. 35 | extern axpl::ttstring MainDlgTitleBar(HINSTANCE hInstance = NULL); 36 | // 37 | // Dialog functions 38 | // 39 | bool GetNewPassphrase(char** szPassphrase, TCHAR** szKeyFileName, HWND hWnd = NULL); 40 | bool GetPassphrase(int iPromptID, LPCTSTR szFileName, auto_ptr& szPassphrase, auto_ptr& szKeyFileName, HWND hWnd = NULL); 41 | bool WarningDlg(LPCTSTR szFileName, DWORD dwMsg, DWORD dwNotAgainMsg, BOOL& fNotAgain); 42 | void FlashBox(); 43 | #endif _DIALOG -------------------------------------------------------------------------------- /XecretsFileCommon/CFmtMsg.h: -------------------------------------------------------------------------------- 1 | #ifndef CFMTMSG_H 2 | #define CFMTMSG_H 3 | /* 4 | @(#) $Id$ 5 | 6 | The purpose of this class is to encapsulate functionality for dynamically 7 | allocating strings that is the result for printf-like functionality. I'm 8 | not sure how this should be done portably for a MacIntosh or Unix-platform... 9 | 10 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 11 | 12 | This program is free software; you can redistribute it and/or modify it under the terms 13 | of the GNU General Public License as published by the Free Software Foundation; 14 | either version 2 of the License, or (at your option) any later version. 15 | 16 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 17 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | See the GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License along with this program; 21 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 22 | Boston, MA 02111-1307 USA 23 | 24 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 25 | ---- 26 | CFmtMsg.h Actions on temporary files and directories 27 | 28 | E-mail YYYY-MM-DD Reason 29 | support@axantum.com 2002-10-07 Initial 30 | 31 | */ 32 | 33 | #include 34 | 35 | class CFmtMsg { 36 | TCHAR *m_szFmtMsg; 37 | public: 38 | CFmtMsg(const TCHAR *szMsg, ...); 39 | CFmtMsg(CFmtMsg& fmtmsg); 40 | CFmtMsg(void); 41 | 42 | void Fmt(const TCHAR *szMsg, ...); 43 | ~CFmtMsg(); 44 | TCHAR *Get(); 45 | }; 46 | 47 | #endif -------------------------------------------------------------------------------- /AxSigLib/Base34Dec.cpp: -------------------------------------------------------------------------------- 1 | /*! \file 2 | \brief AxSigLib - Short Elliptic Curve Digital Signature Algorithm et. al. 3 | 4 | @(#) $Id$ 5 | 6 | Decode Base34 strings. These are strings using A-N, P-Z, 1-9 as their digits, 7 | valued in that sequence, i.e. A is zero, 9 is thirty-two. 8 | 9 | Copyright (C) 2005-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | */ 26 | #include "stdafx.h" 27 | #include "Base34Dec.h" 28 | 29 | void 30 | Base34Decoder::IsolatedInitialize(const NameValuePairs& parameters) { 31 | BaseM_Decoder::Initialize(CombinedNameValuePairs( 32 | parameters, 33 | MakeParameters(Name::DecodingLookupArray(), GetDefaultDecodingLookupArray(), false)(Name::AnyBase(), 34, true))); 34 | } 35 | 36 | const int* 37 | Base34Decoder::GetDefaultDecodingLookupArray() { 38 | static bool s_initialized = false; 39 | static int s_array[256]; 40 | 41 | if (!s_initialized) { 42 | InitializeDecodingLookupArray(s_array, s_vecUpper, (int)strlen((const char*)s_vecUpper), true); 43 | s_initialized = true; 44 | } 45 | return s_array; 46 | } -------------------------------------------------------------------------------- /AxSigLib/BaseM.h: -------------------------------------------------------------------------------- 1 | #ifndef AXSIGLIB_BASEM_H 2 | #define AXSIGLIB_BASEM_H 3 | /*! \file 4 | \brief AxSigLib - Short Elliptic Curve Digital Signature Algorithm et. al. 5 | 6 | @(#) $Id$ 7 | 8 | Define some parameter values for BaseM encoding/decoding. 9 | 10 | AnyBase is the base of the representation 11 | BitPrecision is the total number of bits that the final representation is to have 12 | This is necessary to reserve the appropriate space etc. As a BaseM representation may 13 | not divide conveniently into a few bytes this gets a bit more complicated than for 14 | example base 8, base 16 or for that matter base 64. 15 | 16 | Copyright (C) 2005-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 17 | 18 | This program is free software; you can redistribute it and/or modify it under the terms 19 | of the GNU General Public License as published by the Free Software Foundation; 20 | either version 2 of the License, or (at your option) any later version. 21 | 22 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 23 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 24 | See the GNU General Public License for more details. 25 | 26 | You should have received a copy of the GNU General Public License along with this program; 27 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 28 | Boston, MA 02111-1307 USA 29 | 30 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 31 | ---- 32 | */ 33 | 34 | #include "basecode.h" 35 | #include "fltrimpl.h" 36 | 37 | NAMESPACE_BEGIN(CryptoPP) 38 | DOCUMENTED_NAMESPACE_BEGIN(Name) 39 | CRYPTOPP_DEFINE_NAME_STRING(AnyBase) //< int 40 | CRYPTOPP_DEFINE_NAME_STRING(BitPrecision) //< int 41 | DOCUMENTED_NAMESPACE_END 42 | NAMESPACE_END 43 | 44 | USING_NAMESPACE(CryptoPP) 45 | 46 | #endif -------------------------------------------------------------------------------- /XecretsFileClassic/XecretsFileClassic.manifest.Win32: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | Xecrets File Classic - Axantum File Encryption 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /XecretsFileClassic/XecretsFileClassic.manifest.x64: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | Xecrets File Classic - Axantum File Encryption 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /AxSigLib/CRestrictMgr.h: -------------------------------------------------------------------------------- 1 | #ifndef CRESTRICTMGR_H 2 | #define CRESTRICTMGR_H 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2004-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | CRestrictMgr.h Keep track of effective restrictions 26 | */ 27 | #include 28 | 29 | using namespace std; 30 | 31 | class CRestrictMgr { 32 | ttstringmap m_smRestrictions; // The list of restrictions as strings. 33 | public: 34 | CRestrictMgr() {} 35 | ~CRestrictMgr() { 36 | } 37 | /// \brief Set a restriction - empty string means remove restriction. 38 | void Set(ttstring sRestrict, const ttstring sValue); 39 | /// \brief Check if there is a restriction with that name at all 40 | bool Has(ttstring sRestrict); 41 | /// \brief Get the restriction as a string. Must exist. 42 | const ttstring& GetStr(ttstring sRestrict); 43 | /// \brief Get the restriction interpreted as an integer. Must exist. 44 | int GetInt(ttstring sRestrict); 45 | }; 46 | 47 | #endif -------------------------------------------------------------------------------- /AxDecrypt/AxDecrypt.manifest.Win32: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | AxDecrypt - Decrypt Xecrets File Classic/AxCrypt 1.x files 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /XecretsFile2Go/XecretsFile2Go.manifest.Win32: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | XecretsFile2Go - Portable Xecrets File Classic 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /XecretsFileClassic/CActiveThreads.h: -------------------------------------------------------------------------------- 1 | #ifndef _CACTIVETHREADS 2 | #define _CACTIVETHREADS 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | CActiveThreads.h Keep track of threads so we can exit cleanly. 26 | 27 | E-mail YYYY-MM-DD Reason 28 | support@axantum.com 2001 Initial 29 | 30 | */ 31 | // 32 | // CActiveThreads is used to record the current threads of the 33 | // master instance, to ensure that they are properly waited for 34 | // at termination, and to store the appropriate keys. 35 | // 36 | class CActiveThreads { 37 | CActiveThreads* m_pNext; 38 | HANDLE m_hThread; 39 | DWORD m_dwThreadId; 40 | DWORD m_dwUniqueInternalId; 41 | public: 42 | CActiveThreads(CActiveThreads*& pRoot, HANDLE hThread, DWORD dwThreadId); 43 | ~CActiveThreads(); 44 | void Remove(CActiveThreads*& pRoot, DWORD dwUniqueInternalId); 45 | HANDLE Thread(); 46 | DWORD ThreadId(); 47 | DWORD UniqueInternalId(); 48 | CActiveThreads* Next(); 49 | }; 50 | #endif _CACTIVETHREADS -------------------------------------------------------------------------------- /AxPipe/CSourceAxMLite.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /*! \file 3 | \brief Declaration of AxPipe::Stock::CSourceAxMLite 4 | 5 | @(#) $Id$ 6 | 7 | AxPipe - Binary Stream Framework 8 | 9 | Copyright (C) 2003-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:axpipe@axondata.se and http://axpipe.sourceforge.net 24 | 25 | Why is this framework released as GPL and not LGPL? 26 | See http://www.gnu.org/philosophy/why-not-lgpl.html 27 | 28 | ---- 29 | \verbatim 30 | E-mail YYYY-MM-DD Reason 31 | axpipe@axondata.se 2004-09-12 Initial 32 | \endverbatim 33 | */ 34 | #include "AxPipe.h" 35 | #include "../AxWinLib/AxMLite.h" 36 | 37 | namespace AxPipe { 38 | namespace Stock { 39 | /// \brief produce a XML-stream from an XMLite XML object 40 | class CSourceAxMLite : public CSourceMem { 41 | axpl::ttstring m_xml; ///< The string representation of the XML 42 | public: 43 | CSourceAxMLite() : CSourceMem() { 44 | } 45 | 46 | CSourceAxMLite* Init(XNode* pXNode) { 47 | m_xml = pXNode->GetXML(); 48 | CSourceMem::Init(m_xml.size() * sizeof(m_xml[0]), m_xml.data()); 49 | return this; 50 | } 51 | }; 52 | } // namespace Stock; 53 | } // namespace AxPipe; -------------------------------------------------------------------------------- /XecretsFileClassic/CCryptoRand.h: -------------------------------------------------------------------------------- 1 | #ifndef _CCRYPTORAND 2 | #define _CCRYPTORAND 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | CCryptoRand.cpp Entropy pool and random number generator (FIPS 186-2). 26 | 27 | E-mail YYYY-MM-DD Reason 28 | support@axantum.com 2001 Initial 29 | 30 | */ 31 | #include "CSha1.h" 32 | // 33 | // CCryptoRand.h - Pseudo Random Number Generator using FIPS 186-2 with SHA-1. 34 | // Reference: http://csrc.nist.gov/publications/fips/fips186-2/fips186-2.pdf 35 | // 36 | // Svante Seleborg 37 | // 38 | // 2001-10-07 Initial 39 | // 40 | class CCryptoRand { 41 | public: 42 | CCryptoRand(); 43 | ~CCryptoRand(); 44 | CCryptoRand& Seed(void* pvXSeed, int iLen); 45 | void RandomFill(void* vpBuf, DWORD dwLen); 46 | private: 47 | BYTE m_aoEntropyPool[128]; 48 | unsigned int uiPoolIndex; 49 | THash* m_putXKey; // The next XKEY to use. 50 | THash* m_putXSeed; // The next XSEED to use. 51 | static DWORD m_dwInitKey[5]; // Initial XKEY used. 52 | SHA1_CTX* m_putContext; 53 | }; 54 | #endif _CCRYPTORAND -------------------------------------------------------------------------------- /Build/README.txt: -------------------------------------------------------------------------------- 1 | Xecrets File Classic Open Source File Encryption for Windows 2 | =============================================== 3 | 4 | Xecrets File Classic is a set of programs for strong encryption of individual or groups of files in Windows. It 5 | integrates with Windows Explorer to provide right-click and double-click integration into Windows 6 | making it very easy to use. 7 | 8 | There is no configuration necessary, Xecrets File Classic makes appropriate choices for you, and is targeted for 9 | general use by consumers and professionals in for example translation, health care, law, IT management, 10 | power and water utilities, contractors etc. In brief, anyone with a need to maintain personal, client 11 | or patient confidentiality should benefit from using Xecrets File Classic. 12 | 13 | No special technical skills are required to use Xecrets File Classic, beyond general computer skills enabling you 14 | to download and install software from the Internet and basic use of Windows. 15 | 16 | While the installation is in English, the program is translated into many languages - hopefully yours. 17 | 18 | If you would like to contribute a translation, please send an e-mail to mailto:support@axantum.com . 19 | 20 | In addition to basic use, Xecrets File Classic can also be integrated into IT management solutions and other software. 21 | 22 | Xecrets File Classic is fully open source licensed under GPL and can be built and developed using entirely free tools 23 | such as Microsoft Visual C++ 2010 Express, MSBuild 4.0 and Windows Installer XML (WiX) 4.5 toolset. 24 | 25 | Please see the following resources for more details and specific uses: 26 | 27 | - http://www.axantum.com/ - the main source of information and downloads. 28 | - ReleaseNotes.txt contains summary information for each release. 29 | - ChangeLog.txt contains an issue-by-issue list of changes for each release. 30 | - In the XecretsFileClassic-X-Y-NNNN.0.Source.zip archive, see 'HowToBuildXecretsFile.txt' for instructions on how to set 31 | up a development environment building your own Xecrets File Classic. 32 | -------------------------------------------------------------------------------- /XecretsFileLib/CXecretsFileLib.cpp: -------------------------------------------------------------------------------- 1 | /*! \file 2 | \brief CXecretsFileLib.cpp - The private implementation class of the non-GUI Xecrets File Classic library 3 | 4 | @(#) $Id$ 5 | 6 | CXecretsFileLib - Common non-GUI implementation class of the XecretsFileLib library for Xecrets File Classic. 7 | 8 | Copyright (C) 2005-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 9 | 10 | This program is free software; you can redistribute it and/or modify it under the terms 11 | of the GNU General Public License as published by the Free Software Foundation; 12 | either version 2 of the License, or (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 15 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along with this program; 19 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 23 | 24 | Why is this framework released as GPL and not LGPL? See http://www.gnu.org/philosophy/why-not-lgpl.html 25 | 26 | ---- 27 | \verbatim 28 | YYYY-MM-DD Reason 29 | 2005-09-13 Initial 30 | \endverbatim 31 | */ 32 | #include "stdafx.h" 33 | 34 | #include "CXecretsFileLibMisc.h" 35 | 36 | #include "Assert.h" 37 | #define ASSERT_FILE "CXecretsFileLib.cpp" 38 | 39 | /// \brief The Xecrets File GUID 40 | /// Define the guid here xor 0xff, i.e. inverted, so we won't trig on it 41 | /// when scanning for GUID in ourselves, looking for the appended .xxx- 42 | /// files. 43 | axcl::byte axcl::guidAxCryptFileIdInverse[16] = { 44 | 0xc0 ^ 0xff, 0xb9 ^ 0xff, 0x07 ^ 0xff, 0x2e ^ 0xff, 0x4f ^ 0xff, 0x93 ^ 0xff, 0xf1 ^ 0xff, 0x46 ^ 0xff, 45 | 0xa0 ^ 0xff, 0x15 ^ 0xff, 0x79 ^ 0xff, 0x2c ^ 0xff, 0xa1 ^ 0xff, 0xd9 ^ 0xff, 0xe8 ^ 0xff, 0x21 ^ 0xff 46 | }; -------------------------------------------------------------------------------- /XecretsFileCommon/CSubKey.h: -------------------------------------------------------------------------------- 1 | #ifndef _CSUBKEY 2 | #define _CSUBKEY 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | CSubKey.cpp Generate sub-keys 26 | 27 | E-mail YYYY-MM-DD Reason 28 | support@axantum.com 2001 Initial 29 | 30 | */ 31 | // 32 | // Generate subkeys for various uses. This class has two main purposes: 33 | // 34 | // 1 - to avoid conflicts caused by using the same subkey in different contexts. 35 | // 2 - to isolate knowledge of relationship between key-size and block-size. 36 | // 37 | // Exposing one or more subkeys must not endanger either the other subkeys, or the 38 | // master key. In fact, the eValidator key is exposed in the file, and never used 39 | // for actual encryption. 40 | // 41 | class CSubKey { 42 | private: 43 | TKey *m_pSubKey; 44 | public: 45 | enum etSubKey { 46 | eHMAC, 47 | eValidator, 48 | eHeaders, 49 | eData 50 | }; 51 | 52 | CSubKey(); 53 | ~CSubKey(); 54 | CSubKey& Set(TKey *pMasterKey, etSubKey eSubKey); 55 | TKey *Get(); 56 | }; 57 | #endif _CSUBKEY -------------------------------------------------------------------------------- /XecretsFile2Go/XecretsFile2GoWin.h: -------------------------------------------------------------------------------- 1 | #ifndef XECRETSFILE2GOWIN_H 2 | #define XECRETSFILE2GOWIN_H 3 | /*! \file 4 | \brief XecretsFile2GoWin.h - The Windows implementation of XecretsFile2Go 5 | 6 | Windows-specific global stuff, there should be no internal other include-dependencies for this data 7 | 8 | @(#) $Id$ 9 | 10 | XecretsFile2Go - Stand-Alone Install-free Xecrets File Classic for the road. 11 | 12 | Copyright (C) 2005-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 13 | 14 | This program is free software; you can redistribute it and/or modify it under the terms 15 | of the GNU General Public License as published by the Free Software Foundation; 16 | either version 2 of the License, or (at your option) any later version. 17 | 18 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 19 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | See the GNU General Public License for more details. 21 | 22 | You should have received a copy of the GNU General Public License along with this program; 23 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 24 | Boston, MA 02111-1307 USA 25 | 26 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 27 | 28 | Why is this framework released as GPL and not LGPL? See http://www.gnu.org/philosophy/why-not-lgpl.html 29 | 30 | ---- 31 | \verbatim 32 | YYYY-MM-DD Reason 33 | 2005-08-06 Initial 34 | \endverbatim 35 | */ 36 | 37 | #include "../AxWinLib/AxAssert.h" 38 | #define AXLIB_ASSERT_FILE "XecretsFile2GoWin.h" 39 | 40 | /// \brief Windows messages used by the application. WM_USER is reserved. 41 | enum { 42 | WM_USER_WORKERTHREAD = WM_USER + 1, ///< Create a worker-thread 43 | WM_USER_CREATEPROGRESS, ///< Create a progress window 44 | WM_USER_DESTROYPROGRESS, ///< Destroy a progress window 45 | WM_USER_CHANGENOTIFICATION, ///< Something has changed in the list view 46 | }; 47 | 48 | #endif // XECRETSFILE2GOWIN_H -------------------------------------------------------------------------------- /AES/rijndael-alg-fst.h: -------------------------------------------------------------------------------- 1 | /** 2 | * rijndael-alg-fst.h 3 | * 4 | * @version 3.0 (December 2000) 5 | * 6 | * Optimised ANSI C code for the Rijndael cipher (now AES) 7 | * 8 | * @author Vincent Rijmen 9 | * @author Antoon Bosselaers 10 | * @author Paulo Barreto 11 | * 12 | * This code is hereby placed in the public domain. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS 15 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE 18 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 21 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 22 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 23 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 24 | * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | #ifndef __RIJNDAEL_ALG_FST_H 27 | #define __RIJNDAEL_ALG_FST_H 28 | 29 | #define MAXKC (256/32) 30 | #define MAXKB (256/8) 31 | #define MAXNR 14 32 | 33 | typedef unsigned char u8; 34 | typedef unsigned short u16; 35 | typedef unsigned int u32; 36 | 37 | int rijndaelKeySetupEnc(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits); 38 | int rijndaelKeySetupDec(u32 rk[/*4*(Nr + 1)*/], const u8 cipherKey[], int keyBits); 39 | void rijndaelEncrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 pt[16], u8 ct[16]); 40 | void rijndaelDecrypt(const u32 rk[/*4*(Nr + 1)*/], int Nr, const u8 ct[16], u8 pt[16]); 41 | 42 | #ifdef INTERMEDIATE_VALUE_KAT 43 | void rijndaelEncryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds); 44 | void rijndaelDecryptRound(const u32 rk[/*4*(Nr + 1)*/], int Nr, u8 block[16], int rounds); 45 | #endif /* INTERMEDIATE_VALUE_KAT */ 46 | 47 | #endif /* __RIJNDAEL_ALG_FST_H */ 48 | -------------------------------------------------------------------------------- /XecretsFileLib/Assert.h: -------------------------------------------------------------------------------- 1 | // This is always undefined here, so we always can #define it after inclusion of this header. 2 | // You may, and should, include in every file where you use the assert macros. 3 | #ifdef ASSERT_FILE 4 | #undef ASSERT_FILE 5 | #endif 6 | 7 | #ifndef ASSERT_H 8 | #define ASSERT_H 9 | /*! \file 10 | \brief Assert.h - Convenience macros for assertions 11 | 12 | @(#) $Id$ 13 | 14 | axcl - Xecrets File Classic support classes and types 15 | 16 | Copyright (C) 2008-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 17 | 18 | This program is free software; you can redistribute it and/or modify it under the terms 19 | of the GNU General Public License as published by the Free Software Foundation; 20 | either version 2 of the License, or (at your option) any later version. 21 | 22 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 23 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 24 | See the GNU General Public License for more details. 25 | 26 | You should have received a copy of the GNU General Public License along with this program; 27 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 28 | Boston, MA 02111-1307 USA 29 | 30 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 31 | ---- 32 | */ 33 | #include 34 | 35 | #ifndef ASSCHK 36 | /// \brief Assert any custom condition 37 | /// 38 | /// Do the if to ensure that the condition is evaluted before the call AssFunc, so that parameters 39 | /// depending on that is properly passed to the function 40 | /// \param fOk An expression that must validate to 'true' 41 | /// \param sz A string with a message about the assertion. 42 | #define ASSCHK(fOk, sz) { bool f = (fOk); assert((ASSERT_FILE, __LINE__, sz, f)); } 43 | #endif 44 | 45 | #ifndef ASSPTR 46 | /// \brief Assert that a pointer is non-NULL 47 | /// \param p A pointer expression that must not be NULL 48 | #define ASSPTR(p) { bool f = (p) != NULL; assert((ASSERT_FILE, __LINE__, f)); } 49 | #endif 50 | 51 | #endif -------------------------------------------------------------------------------- /AxWinLib/CDocumentAppLaunch.cpp: -------------------------------------------------------------------------------- 1 | /*! \file 2 | \brief Implement launch-and-wait functionality for a document. 3 | 4 | @(#) $Id$ 5 | 6 | Copyright (C) 2006-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 7 | 8 | This program is free software; you can redistribute it and/or modify it under the terms 9 | of the GNU General Public License as published by the Free Software Foundation; 10 | either version 2 of the License, or (at your option) any later version. 11 | 12 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 13 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 14 | See the GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License along with this program; 17 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 18 | Boston, MA 02111-1307 USA 19 | 20 | The author may be reached at mailto:svante@axantum.com and http://wwww.axantum.com 21 | ---- 22 | CDocumentAppLaunch.cpp 23 | */ 24 | #include "stdafx.h" 25 | 26 | #include 27 | 28 | #include "IDocumentAppLaunch.h" 29 | 30 | namespace awl { 31 | class CDocumentAppLaunch : public IDocumentAppLaunch { 32 | std::wstring m_ErrorMessage; 33 | 34 | public: 35 | CDocumentAppLaunch() : m_ErrorMessage() { 36 | } 37 | 38 | /// \brief Launch the app and wait. 39 | /// \param wzDocumentPath The full path to the document. 40 | /// \return true if all went well. 41 | virtual bool LaunchAndWait(const wchar_t* wzDocumentPath) { 42 | m_ErrorMessage = L"Not Yet Implemented"; 43 | return false; 44 | } 45 | 46 | /// \brief If an error, an error message is kept here. 47 | /// \return The error message, or an empty string. 48 | virtual const wchar_t* ErrorMessage() { 49 | return m_ErrorMessage.c_str(); 50 | } 51 | 52 | virtual ~CDocumentAppLaunch() { 53 | } 54 | }; 55 | 56 | /// \brief Create an instance of CDocumentAppLaunch 57 | IDocumentAppLaunch* IDocumentAppLaunch::New() { 58 | return new CDocumentAppLaunch(); 59 | } 60 | } -------------------------------------------------------------------------------- /XecretsFileClassic/CFileTemp.h: -------------------------------------------------------------------------------- 1 | #ifndef _CFILETEMP 2 | #define _CFILETEMP 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | CFileTemp.h Temp file related operations 26 | 27 | E-mail YYYY-MM-DD Reason 28 | support@axantum.com 2001 Initial 29 | 2001-12-01 Added CTempDir 30 | 31 | */ 32 | #include "../XecretsFileCommon/CFileName.h" 33 | // 34 | // Create temporary file 35 | // 36 | class CFileTemp : public CFileName { 37 | public: 38 | CFileTemp() : CFileName() {} 39 | CFileTemp& New(); 40 | }; 41 | // 42 | // Create and destroy temporary directory. 43 | // 44 | class CTempDir : public CFileName { 45 | public: 46 | 47 | CTempDir(DWORD nWipePasses) : CFileName() { 48 | m_nWipePasses = nWipePasses; 49 | } 50 | ~CTempDir(); 51 | 52 | CTempDir& New(); // Make a new temp-file. 53 | LPCTSTR Get(); 54 | CTempDir& SetPath2TempDir(); 55 | private: 56 | DWORD RemoveDir(); // Empty a directory and delete it. 57 | DWORD RmDir(LPCTSTR szDir); // Helper to recursively delete a directory. 58 | DWORD m_nWipePasses; ///< The number of passes to wipe the temps 59 | }; 60 | #endif _CFILETEMP -------------------------------------------------------------------------------- /XecretsFile2Go/CConfigWin.h: -------------------------------------------------------------------------------- 1 | #ifndef CCONFIGWIN_H 2 | #define CCONFIGWIN_H 3 | /*! \file 4 | \brief CConfigWin.h - Configuration information for XecretsFile2Go, Windows-specific 5 | 6 | @(#) $Id$ 7 | 8 | XecretsFile2Go - Stand-Alone Install-free Xecrets File Classic for the road. 9 | 10 | Windows specific additions to configuration data that may not have an exact equivalent in another 11 | environment, such as the concept of file extensions and version resource information. 12 | 13 | Copyright (C) 2006-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 14 | 15 | This program is free software; you can redistribute it and/or modify it under the terms 16 | of the GNU General Public License as published by the Free Software Foundation; 17 | either version 2 of the License, or (at your option) any later version. 18 | 19 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 20 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | See the GNU General Public License for more details. 22 | 23 | You should have received a copy of the GNU General Public License along with this program; 24 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 25 | Boston, MA 02111-1307 USA 26 | 27 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 28 | 29 | Why is this framework released as GPL and not LGPL? See http://www.gnu.org/philosophy/why-not-lgpl.html 30 | 31 | ---- 32 | \verbatim 33 | YYYY-MM-DD Reason 34 | 2006-01-15 Initial 35 | \endverbatim 36 | */ 37 | #include "CConfig.h" 38 | 39 | #include "../AxWinLib/AxAssert.h" 40 | #define AXLIB_ASSERT_FILE "CConfigWin.h" 41 | 42 | class CConfigWin : public CConfig { 43 | private: 44 | static const axcl::tstring m_sEncryptedFileExtension; 45 | 46 | protected: 47 | CConfigWin() {} 48 | 49 | public: 50 | /// \brief Return the extension we use for encrypted files, with the "." 51 | /// \returns .xxx 52 | static const axcl::tstring& GetEncryptedFileExtension() { 53 | return m_sEncryptedFileExtension; 54 | } 55 | }; 56 | 57 | #endif // CCONFIGWIN_H -------------------------------------------------------------------------------- /XecretsFileCommon/CStrPtr.h: -------------------------------------------------------------------------------- 1 | #ifndef _CSTRPTR 2 | #define _CSTRPTR 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | CStrPtr.h Simple special purpose "standard" string class. 26 | 27 | E-mail YYYY-MM-DD Reason 28 | support@axantum.com 2001 Initial 29 | 30 | */ 31 | // 32 | // Helper class to make an object out of a string-pointer, thereby 33 | // enabling proper deletion, regardless of how a function is exited. 34 | // 35 | class CStrPtr { 36 | LPTSTR m_szStr; 37 | public: 38 | // A collection of constructors. 39 | CStrPtr(); 40 | CStrPtr(int iSiz); 41 | CStrPtr(CStrPtr& utStr); 42 | CStrPtr(LPCTSTR szStr); 43 | 44 | ~CStrPtr(); // Delete allocated memory if any. 45 | operator LPTSTR(); // Return a buffer pointer, use with care. 46 | operator LPCTSTR(); 47 | operator BYTE *(); 48 | CStrPtr& operator= (LPCTSTR szStr); // Proper copy-assignment 49 | CStrPtr& operator= (CStrPtr& utStr); // Proper copy-assignment 50 | CStrPtr& operator+ (CStrPtr& utStr); // Ok - so we had to do this too. Sigh. 51 | LPTSTR Ptr(); // Return and dissociate the pointer. 52 | }; 53 | #endif _CSTRPTR -------------------------------------------------------------------------------- /XecretsFileLib/XecretsFileLibPP.cpp: -------------------------------------------------------------------------------- 1 | /*! \file 2 | \brief XecretsFileLibPP.cpp - C++ useage of XecretsFileLib, common declarations namespace axcl 3 | 4 | @(#) $Id$ 5 | 6 | axcl - Common support library for Xecrets File Classic 7 | 8 | Copyright (C) 2005-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 9 | 10 | This program is free software; you can redistribute it and/or modify it under the terms 11 | of the GNU General Public License as published by the Free Software Foundation; 12 | either version 2 of the License, or (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 15 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along with this program; 19 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 23 | 24 | Why is this framework released as GPL and not LGPL? See http://www.gnu.org/philosophy/why-not-lgpl.html 25 | 26 | ---- 27 | \verbatim 28 | YYYY-MM-DD Reason 29 | 2005-06-26 Initial (moved/restructured from Xecrets File Classic) 30 | \endverbatim 31 | */ 32 | #include "stdafx.h" 33 | 34 | #include "XecretsFileLibPP.h" 35 | 36 | namespace axcl { 37 | char* strdup(const char* s) { return strcpy(new char[strlen(s) + 1], s); } 38 | #ifdef _UNICODE 39 | wchar_t* tstrcpy(wchar_t* d, const wchar_t* s) { return wcscpy(d, s); } 40 | wchar_t* tstrcat(wchar_t* d, const wchar_t* s) { return wcscat(d, s); } 41 | size_t tstrlen(const wchar_t* s) { return wcslen(s); } 42 | wchar_t* tstrdup(const wchar_t* s) { return wcscpy(new wchar_t[wcslen(s) + 1], s); } 43 | #else 44 | char* tstrcpy(char* d, const char* s) { return strcpy(d, s); } 45 | char* tstrcat(char* d, const char* s) { return strcat(d, s); } 46 | size_t tstrlen(const char* s) { return strlen(s); } 47 | char* tstrdup(const char* s) { return strdup(s); } 48 | #endif 49 | } -------------------------------------------------------------------------------- /AxDecrypt/AxDecrypt.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | 46 | 47 | Resource Files 48 | 49 | 50 | 51 | 52 | Resource Files 53 | 54 | 55 | Resource Files 56 | 57 | 58 | -------------------------------------------------------------------------------- /XecretsFileMessages/XecretsFileMessages.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #include "resource.h" 4 | 5 | #define APSTUDIO_READONLY_SYMBOLS 6 | ///////////////////////////////////////////////////////////////////////////// 7 | // 8 | // Generated from the TEXTINCLUDE 2 resource. 9 | // 10 | #include "Windows.h" 11 | 12 | #define VERSION_PROJECT_FILE_DESCRIPTION_VALUE "Xecrets File Classic Messages" 13 | #define VERSION_PROJECT_INTERNAL_NAME_VALUE "Messages" 14 | #define VERSION_PROJECT_ORIGINAL_FILENAME_VALUE "Messages.dll" 15 | #define VERSION_PROJECT_FILETYPE VFT_DLL 16 | 17 | ///////////////////////////////////////////////////////////////////////////// 18 | #undef APSTUDIO_READONLY_SYMBOLS 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | // English (United States) resources 22 | 23 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 24 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 25 | #pragma code_page(1252) 26 | 27 | #ifdef APSTUDIO_INVOKED 28 | ///////////////////////////////////////////////////////////////////////////// 29 | // 30 | // TEXTINCLUDE 31 | // 32 | 33 | 1 TEXTINCLUDE 34 | BEGIN 35 | "resource.h\0" 36 | END 37 | 38 | 2 TEXTINCLUDE 39 | BEGIN 40 | "#include ""Windows.h""\r\r\n" 41 | "#define VERSION_PROJECT_FILE_DESCRIPTION_VALUE ""Xecrets File Classic Messages""\r\n" 42 | "#define VERSION_PROJECT_INTERNAL_NAME_VALUE ""Messages""\r\n" 43 | "#define VERSION_PROJECT_ORIGINAL_FILENAME_VALUE ""Messages.dll""\r\n" 44 | "#define VERSION_PROJECT_FILETYPE VFT_DLL\r\n" 45 | "\0" 46 | END 47 | 48 | 3 TEXTINCLUDE 49 | BEGIN 50 | "#include ""Version.h""\r\n" 51 | "#include ""Version.rc""\r\n" 52 | "#include ""XecretsFileTexts.rc""\0" 53 | END 54 | 55 | #endif // APSTUDIO_INVOKED 56 | 57 | #endif // English (United States) resources 58 | ///////////////////////////////////////////////////////////////////////////// 59 | 60 | #ifndef APSTUDIO_INVOKED 61 | ///////////////////////////////////////////////////////////////////////////// 62 | // 63 | // Generated from the TEXTINCLUDE 3 resource. 64 | // 65 | #include "Version.h" 66 | #include "Version.rc" 67 | #include "XecretsFileTexts.rc" 68 | ///////////////////////////////////////////////////////////////////////////// 69 | #endif // not APSTUDIO_INVOKED -------------------------------------------------------------------------------- /AxSigLib/BaseMDec.h: -------------------------------------------------------------------------------- 1 | #ifndef AXSIGLIB_BASEMDEC_H 2 | #define AXSIGLIB_BASEMDEC_H 3 | /*! \file 4 | \brief AxSigLib - Short Elliptic Curve Digital Signature Algorithm et. al. 5 | 6 | @(#) $Id$ 7 | 8 | Decode BaseM strings. These are based on the encoding vectors such as (for Base34): 9 | 10 | static const byte s_vecUpper[] = "ABCDEFGHIJKLMNPQRSTUVWXYZ123456789"; 11 | static const byte s_vecLower[] = "abcdefghijklmnpqrstuvwxyz123456789"; 12 | 13 | Copyright (C) 2005-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 14 | 15 | This program is free software; you can redistribute it and/or modify it under the terms 16 | of the GNU General Public License as published by the Free Software Foundation; 17 | either version 2 of the License, or (at your option) any later version. 18 | 19 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 20 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 21 | See the GNU General Public License for more details. 22 | 23 | You should have received a copy of the GNU General Public License along with this program; 24 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 25 | Boston, MA 02111-1307 USA 26 | 27 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 28 | ---- 29 | */ 30 | 31 | #include "BaseM.h" 32 | 33 | //! base m decoder, where m is any number <= number of printable characters. 34 | class BaseM_Decoder : public BaseN_Decoder { 35 | public: 36 | BaseM_Decoder(const int* lookup, int anybase, int bits, BufferedTransformation* attachment = NULL) { 37 | Detach(attachment); 38 | IsolatedInitialize(MakeParameters(Name::DecodingLookupArray(), lookup) 39 | (Name::AnyBase(), anybase) 40 | (Name::BitPrecision(), bits)); 41 | } 42 | 43 | void IsolatedInitialize(const NameValuePairs& parameters); 44 | size_t Put2(const byte* begin, size_t length, int messageEnd, bool blocking); 45 | 46 | static void InitializeDecodingLookupArray(int* lookup, const byte* alphabet, unsigned int base, bool caseInsensitive); 47 | 48 | private: 49 | const int* m_lookup; 50 | int m_padding, m_base, m_bits; 51 | SecByteBlock m_buffer; 52 | }; 53 | 54 | #endif -------------------------------------------------------------------------------- /AxPortLib/strcvt.h: -------------------------------------------------------------------------------- 1 | #ifndef AXPORTLIB_STRCVT_H 2 | #define AXPORTLIB_STRCVT_H 3 | /*! \file 4 | \brief AxPortLib - String conversion etc 5 | 6 | @(#) $Id$ 7 | 8 | Copyright (C) 2008-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 9 | 10 | This program is free software; you can redistribute it and/or modify it under the terms 11 | of the GNU General Public License as published by the Free Software Foundation; 12 | either version 2 of the License, or (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 15 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along with this program; 19 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 23 | --- 24 | */ 25 | 26 | #include 27 | #include 28 | 29 | namespace axpl { 30 | /// \brief Convert a wide Unicode string to a narrow Ansi string 31 | /// \param ws A wide string to convert 32 | /// \return A converted narrow string 33 | inline std::string ws2s(const std::wstring& ws) { 34 | const std::ctype& converter(std::use_facet >(std::locale())); 35 | 36 | std::string s; 37 | s.reserve(ws.size()); 38 | 39 | for (std::wstring::const_iterator it = ws.begin(); it != ws.end(); ++it) { 40 | s.push_back(converter.narrow(*it, '_')); 41 | } 42 | return s; 43 | } 44 | 45 | /// \brief Convert a narrow Ansi string to a wide Unicode string 46 | /// \param s A narrow string to convert 47 | /// \return A converted wide Unicode string 48 | inline std::wstring s2ws(const std::string& s) { 49 | const std::ctype& converter(std::use_facet >(std::locale())); 50 | 51 | std::wstring ws; 52 | ws.reserve(s.size()); 53 | 54 | for (std::string::const_iterator it = s.begin(); it != s.end(); ++it) { 55 | ws.push_back(converter.widen(*it)); 56 | } 57 | return ws; 58 | } 59 | } 60 | #endif -------------------------------------------------------------------------------- /XecretsFile2Go/Axgettext.h: -------------------------------------------------------------------------------- 1 | #ifndef AXGETTEXT_H 2 | #define AXGETTEXT_H 3 | /*! \file 4 | \brief Axgettext.h - Interface to GNU gettext routines 5 | 6 | @(#) $Id$ 7 | 8 | Axgettext.h - Interface to GNU gettext routines 9 | 10 | Copyright (C) 2005-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 11 | 12 | This program is free software; you can redistribute it and/or modify it under the terms 13 | of the GNU General Public License as published by the Free Software Foundation; 14 | either version 2 of the License, or (at your option) any later version. 15 | 16 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 17 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 18 | See the GNU General Public License for more details. 19 | 20 | You should have received a copy of the GNU General Public License along with this program; 21 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 22 | Boston, MA 02111-1307 USA 23 | 24 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 25 | ---- 26 | */ 27 | //#include "libintl.h" 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #include "../AxWinLib/AxAssert.h" 34 | #define AXLIB_ASSERT_FILE "Axgettext.h" 35 | 36 | namespace AxLib { 37 | class CGettext { 38 | private: 39 | typedef std::set > stringset; 40 | static stringset m_setTranslations; 41 | static wchar_t* Utf16Gettext(const char* s); 42 | template static T* SaveReturn(T* s); 43 | 44 | typedef std::map > uintstringmap; 45 | static uintstringmap m_mapStringResources; 46 | public: 47 | static const _TCHAR* Gettext(const char* sMsgId); 48 | static const _TCHAR* GetStringResource(unsigned int uID); 49 | static int sntprintf(_TCHAR* sBuffer, size_t cc, const _TCHAR* sFormat, ...); 50 | static const char* TextDomain(const char* sDomainName); 51 | static const char* BindTextDomain(const char* sDomainName, const char* sDirName); 52 | static const char* BindTextDomainCodeset(const char* sDomainName, const char* sCodeset); 53 | }; 54 | } 55 | 56 | #endif AXGETTEXT_H -------------------------------------------------------------------------------- /AxPipe/AxPipe.cpp: -------------------------------------------------------------------------------- 1 | /*! \file 2 | \brief Main class implementation, AxPipe::CSource, AxPipe::CSink, AxPipe::CPipe, AxPipe::CFilter, AxPipe::CJoin, AxPipe::CSplit 3 | 4 | @(#) $Id$ 5 | 6 | AxPipe - Binary Stream Framework 7 | 8 | Copyright (C) 2003-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 9 | 10 | This program is free software; you can redistribute it and/or modify it under the terms 11 | of the GNU General Public License as published by the Free Software Foundation; 12 | either version 2 of the License, or (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 15 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along with this program; 19 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | The author may be reached at mailto:axpipe@axondata.se and http://axpipe.sourceforge.net 23 | 24 | Why is this framework released as GPL and not LGPL? See http://www.gnu.org/philosophy/why-not-lgpl.html 25 | 26 | ---- 27 | \verbatim 28 | AxPipe.cpp Main class implementation 29 | 30 | E-mail YYYY-MM-DD Reason 31 | axpipe@axondata.se 2003-11-23 Initial 32 | \endverbatim 33 | */ 34 | #include "stdafx.h" 35 | using namespace AxPipe; 36 | 37 | #include "../AxWinLib/AxAssert.h" 38 | #define AXLIB_ASSERT_FILE "AxPipe.cpp" 39 | 40 | namespace AxPipe { 41 | /// Used to keep track of thread fiber-status for the pull-filter mode classes. 42 | DWORD AxPipe::dwTlsIndex; 43 | /// Ensure that global data is initialized once, and only once. 44 | volatile long AxPipe::nGlobalInit; 45 | 46 | /// ERROR_CODE_GENERIC - for most errors, one string argument. 47 | const _TCHAR* ERROR_MSG_GENERIC = _T("AxPipe:: %s"); 48 | /// ERROR_CODE_INTERNAL - for fatal internal errors, one string argument. 49 | const _TCHAR* ERROR_MSG_INTERNAL = _T("AxPipe:: Internal error %s"); 50 | /// ERROR_CODE_NOTOPEN - Sequence error in operations - need open first. 51 | const _TCHAR* ERROR_MSG_NOTOPEN = _T("AxPipe:: Pipe not Open"); 52 | } -------------------------------------------------------------------------------- /AxDecrypt/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | WIN32 APPLICATION : AxDecrypt Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this AxDecrypt application for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your AxDecrypt application. 9 | 10 | 11 | AxDecrypt.vcproj 12 | This is the main project file for VC++ projects generated using an Application Wizard. 13 | It contains information about the version of Visual C++ that generated the file, and 14 | information about the platforms, configurations, and project features selected with the 15 | Application Wizard. 16 | 17 | AxDecrypt.cpp 18 | This is the main application source file. 19 | 20 | ///////////////////////////////////////////////////////////////////////////// 21 | AppWizard has created the following resources: 22 | 23 | AxDecrypt.rc 24 | This is a listing of all of the Microsoft Windows resources that the 25 | program uses. It includes the icons, bitmaps, and cursors that are stored 26 | in the RES subdirectory. This file can be directly edited in Microsoft 27 | Visual C++. 28 | 29 | Resource.h 30 | This is the standard header file, which defines new resource IDs. 31 | Microsoft Visual C++ reads and updates this file. 32 | 33 | AxDecrypt.ico 34 | This is an icon file, which is used as the application's icon (32x32). 35 | This icon is included by the main resource file AxDecrypt.rc. 36 | 37 | small.ico 38 | This is an icon file, which contains a smaller version (16x16) 39 | of the application's icon. This icon is included by the main resource 40 | file AxDecrypt.rc. 41 | 42 | ///////////////////////////////////////////////////////////////////////////// 43 | Other standard files: 44 | 45 | StdAfx.h, StdAfx.cpp 46 | These files are used to build a precompiled header (PCH) file 47 | named AxDecrypt.pch and a precompiled types file named StdAfx.obj. 48 | 49 | ///////////////////////////////////////////////////////////////////////////// 50 | Other notes: 51 | 52 | AppWizard uses "TODO:" comments to indicate parts of the source code you 53 | should add to or customize. 54 | 55 | ///////////////////////////////////////////////////////////////////////////// 56 | -------------------------------------------------------------------------------- /XecretsFileClassic/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | WIN32 APPLICATION : XecretsFileClassic Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this XecretsFileClassic application for you. 6 | 7 | This file contains a summary of what you will find in each of the files that 8 | make up your XecretsFileClassic application. 9 | 10 | XecretsFileClassic.vcxproj 11 | This is the main project file for VC++ projects generated using an Application Wizard. 12 | It contains information about the version of Visual C++ that generated the file, and 13 | information about the platforms, configurations, and project features selected with the 14 | Application Wizard. 15 | 16 | XecretsFileClassic.cpp 17 | This is the main application source file. 18 | 19 | ///////////////////////////////////////////////////////////////////////////// 20 | AppWizard has created the following resources: 21 | 22 | XecretsFileClassic.rc 23 | This is a listing of all of the Microsoft Windows resources that the 24 | program uses. It includes the icons, bitmaps, and cursors that are stored 25 | in the RES subdirectory. This file can be directly edited in Microsoft 26 | Visual C++. 27 | 28 | Resource.h 29 | This is the standard header file, which defines new resource IDs. 30 | Microsoft Visual C++ reads and updates this file. 31 | 32 | XecretsFileClassic.ico 33 | This is an icon file, which is used as the application's icon (32x32). 34 | This icon is included by the main resource file XecretsFileClassic.rc. 35 | 36 | small.ico 37 | This is an icon file, which contains a smaller version (16x16) 38 | of the application's icon. This icon is included by the main resource 39 | file XecretsFileClassic.rc. 40 | 41 | ///////////////////////////////////////////////////////////////////////////// 42 | Other standard files: 43 | 44 | StdAfx.h, StdAfx.cpp 45 | These files are used to build a precompiled header (PCH) file 46 | named XecretsFileClassic.pch and a precompiled types file named StdAfx.obj. 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | Other notes: 50 | 51 | AppWizard uses "TODO:" comments to indicate parts of the source code you 52 | should add to or customize. 53 | 54 | ///////////////////////////////////////////////////////////////////////////// 55 | -------------------------------------------------------------------------------- /XecretsFile2Go/ReadMe.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | WIN32 APPLICATION : XecretsFile2Go Project Overview 3 | ======================================================================== 4 | 5 | AppWizard has created this XecretsFile2Go application for you. 6 | This file contains a summary of what you will find in each of the files that 7 | make up your XecretsFile2Go application. 8 | 9 | 10 | XecretsFile2Go.vcproj 11 | This is the main project file for VC++ projects generated using an Application Wizard. 12 | It contains information about the version of Visual C++ that generated the file, and 13 | information about the platforms, configurations, and project features selected with the 14 | Application Wizard. 15 | 16 | XecretsFile2Go.cpp 17 | This is the main application source file. 18 | 19 | ///////////////////////////////////////////////////////////////////////////// 20 | AppWizard has created the following resources: 21 | 22 | XecretsFile2Go.rc 23 | This is a listing of all of the Microsoft Windows resources that the 24 | program uses. It includes the icons, bitmaps, and cursors that are stored 25 | in the RES subdirectory. This file can be directly edited in Microsoft 26 | Visual C++. 27 | 28 | Resource.h 29 | This is the standard header file, which defines new resource IDs. 30 | Microsoft Visual C++ reads and updates this file. 31 | XecretsFile2Go.ico 32 | This is an icon file, which is used as the application's icon (32x32). 33 | This icon is included by the main resource file XecretsFile2Go.rc. 34 | 35 | small.ico 36 | This is an icon file, which contains a smaller version (16x16) 37 | of the application's icon. This icon is included by the main resource 38 | file XecretsFile2Go.rc. 39 | 40 | ///////////////////////////////////////////////////////////////////////////// 41 | Other standard files: 42 | 43 | StdAfx.h, StdAfx.cpp 44 | These files are used to build a precompiled header (PCH) file 45 | named XecretsFile2Go.pch and a precompiled types file named StdAfx.obj. 46 | 47 | ///////////////////////////////////////////////////////////////////////////// 48 | Other notes: 49 | 50 | AppWizard uses "TODO:" comments to indicate parts of the source code you 51 | should add to or customize. 52 | 53 | ///////////////////////////////////////////////////////////////////////////// 54 | -------------------------------------------------------------------------------- /XecretsFileClassic/CWrapper.h: -------------------------------------------------------------------------------- 1 | #ifndef _CWRAPPER 2 | #define _CWRAPPER 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | CWrapper.h Batch the component operations of wrapping/unwrapping in one little class. 26 | 27 | E-mail YYYY-MM-DD Reason 28 | support@axantum.com 2001 Initial 29 | 2002-08-02 Ver 1.2 30 | 31 | */ 32 | #include "CCryptoKey.h" 33 | #include "CFile.h" 34 | #include "../XecretsFileCommon/CFileName.h" 35 | 36 | // 37 | // Utility base class with various useful routines for 38 | // wrapping, unwrapping, and unwrap-launch-wrap etc. 39 | // 40 | class CWrapper { 41 | HWND m_hProgressWnd; 42 | bool m_fEnableProgress; 43 | 44 | protected: 45 | CHeaders* m_pHeaders; 46 | 47 | public: 48 | CWrapper(CHeaders* pHeaders, HWND hProgressWnd); 49 | void Wrap(CFileIO& rFilePlain, CFileIO& rFileCipher, DWORD nWipePasses, BOOL fSlowSafe = TRUE, BOOL fEnableProgress = TRUE); 50 | void Unwrap(CFileIO& rFileCipher, CFileIO& rFilePlain, DWORD nWipePasses, BOOL fSlowSafe = TRUE, BOOL fEnableProgress = TRUE); 51 | 52 | private: 53 | // Parts of the job - separated just to make it clear. 54 | void CompressData(CFileIO& rFilePlain, CFileIO& rFileTmp); 55 | void EncryptData(CFileIO& rFilePlain, CFileIO& rFileCipher); 56 | 57 | void DecryptData(CFileIO& rFileCipher, CFileIO& rFilePlain); 58 | void DeCompressData(CFileIO& rFileTmp, CFileIO& rFilePlain); 59 | }; 60 | #endif _CWRAPPER -------------------------------------------------------------------------------- /AxDecrypt/AxDecrypt.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /*! \file 3 | \brief AxDecrypt - Stand-alone Xecrets File Classic-decrypter and self-extractor. 4 | 5 | @(#) $Id$ 6 | 7 | AxDecrypt - Stand-alone Xecrets File Classic-decrypter and self-extractor. 8 | 9 | Copyright (C) 2004-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | */ 26 | 27 | #if _MSC_VER > 1000 28 | #pragma once 29 | #endif // _MSC_VER > 1000 30 | 31 | #include "resource.h" 32 | #include 33 | using namespace std; 34 | 35 | #include "../AxPipe/AxPipe.h" 36 | #include "../AxPipe/CFileIO.h" 37 | #include "../AxPipe/CPipeSHA1.h" 38 | #include "../AxPipe/CPipeHMAC_SHA1.h" 39 | #include "../AxPipe/CPipeFindSync.h" 40 | #include "../AxPipe/CPipeInflate.h" 41 | #include "../XecretsFileCommon/Types.h" 42 | #include "../XecretsFileCommon/CAes.h" 43 | #include "../XecretsFileCommon/CSubKey.h" 44 | using namespace AxPipe; 45 | 46 | /// \brief Load a string resource into an allocated string. Do delete. 47 | extern _TCHAR* ALoadString(UINT uId, HMODULE hModule = NULL); 48 | 49 | /// \brief Simple helper to XOR two memory blocks to a third. 50 | /// Destination may be a separate block, or one of the two 51 | /// source blocks. 52 | /// \param dst Destination memory block 53 | /// \param src1 One of the source memory blocks 54 | /// \param src2 The other of the source memory blocks 55 | /// \param len The length to XOR (all three buffers must be at least this large) 56 | inline void 57 | XorMemory(void* dst, void* src1, void* src2, size_t len) { 58 | while (len--) *((char*&)(dst))++ = *((char*&)src1)++ ^ *((char*&)src2)++; 59 | } -------------------------------------------------------------------------------- /AxPipe/TBits.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /*! \file 3 | \brief Declaration of AxPipe::Stock::THash and AxPipe::Stock::TKey, template classes for such 4 | 5 | @(#) $Id$ 6 | 7 | AxPipe - Binary Stream Framework 8 | 9 | Copyright (C) 2003-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:axpipe@axondata.se and http://axpipe.sourceforge.net 24 | 25 | Why is this framework released as GPL and not LGPL? 26 | See http://www.gnu.org/philosophy/why-not-lgpl.html 27 | 28 | ---- 29 | \verbatim 30 | E-mail YYYY-MM-DD Reason 31 | axpipe@axondata.se 2003-12-15 Initial 32 | \endverbatim 33 | */ 34 | #include 35 | 36 | namespace AxPipe { 37 | namespace Stock { 38 | /// \brief A template class for hashes of various kinds. 39 | /// 40 | /// Encapsulate common properities of hashes, mostly just for notational 41 | /// convenience. 42 | template class TBits { 43 | unsigned char m_Bits[iBits / 8]; ///< The bits. Yes, I know a char needn't be 8 bits 44 | public: 45 | TBits(); ///< Construct zero-initialized 46 | TBits(unsigned char* bpInit, 47 | int cb); ///< Byte-string initialized 48 | void* GetLeft(const int n); ///< Get the n left-most bits (most significant) 49 | void* GetRight(const int n); ///< Get the n right-most bits (least significant) 50 | 51 | TBits& operator+=(const TBits& rhs); ///< Do long addition of two bit blocks. 52 | TBits& operator^=(const TBits& rhs); ///< Do long xor of two bit blocks. 53 | TBits& operator=(const TBits& rhs); ///< Assign one to another 54 | }; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /XecretsFileClassic/FileCmd.h: -------------------------------------------------------------------------------- 1 | #ifndef _FILECMD_H 2 | #define _FILECMD_H 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | FileCmd.h Implementation of file operation commands from main code. 26 | 27 | E-mail YYYY-MM-DD Reason 28 | support@axantum.com 2001-12-02 Initial for 0.0b4 29 | 30 | */ 31 | 32 | DWORD CmdEncryptZFile(CCmdParam* pCmdParam); 33 | DWORD CmdEncryptZCFile(CCmdParam* pCmdParam); 34 | DWORD CmdSfxEncNewFile(CCmdParam* pCmdParam); 35 | DWORD CmdDecryptFile(CCmdParam* pCmdParam); 36 | DWORD CmdDecryptCFile(CCmdParam* pCmdParam); 37 | DWORD CmdDecryptOpenLaunch(CCmdParam* pCmdParam); 38 | DWORD CmdWipe(CCmdParam* pCmdParam); 39 | DWORD CmdWipeSilent(CCmdParam* pCmdParam); 40 | DWORD CmdClearKeys(CCmdParam* pCmdParam); 41 | DWORD CmdAddKey(CCmdParam* pCmdParam); 42 | DWORD CmdMakeKeyFile(CCmdParam* pCmdParam); 43 | DWORD CmdPromptKey(CCmdParam* pCmdParam); 44 | DWORD CmdAnonRename(CCmdParam* pCmdParam); 45 | DWORD CmdTestHaveKey(CCmdParam* pCmdParam); 46 | DWORD CmdShowIdTag(CCmdParam* pCmdParam); 47 | DWORD CmdBruteForce(CCmdParam* pCmdParam); 48 | DWORD CmdInstallInRegistry(CCmdParam* pCmdParam); 49 | DWORD CmdRemoveFromRegistry(CCmdParam* pCmdParam); 50 | DWORD CmdLicenseMgr(CCmdParam* pCmdParam); 51 | DWORD CmdRegistration(CCmdParam* pCmdParam); 52 | 53 | typedef DWORD(*pfCmdT)(CCmdParam*); 54 | DWORD FileExpand(pfCmdT pfCmd, CCmdParam* pCmdParam, const TCHAR* szDir, const TCHAR* szPattern); 55 | 56 | #endif _FILECMD_H -------------------------------------------------------------------------------- /AxPipe/CPipeHMAC_SHA1.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /*! \file 3 | \brief Declaration of AxPipe::Stock::CPipeHMAC_SHA1, calculate HMAC_SHA1 of the stream 4 | 5 | @(#) $Id$ 6 | 7 | AxPipe - Binary Stream Framework 8 | 9 | Copyright (C) 2003-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:axpipe@axondata.se and http://axpipe.sourceforge.net 24 | 25 | Why is this framework released as GPL and not LGPL? 26 | See http://www.gnu.org/philosophy/why-not-lgpl.html 27 | 28 | ---- 29 | \verbatim 30 | E-mail YYYY-MM-DD Reason 31 | axpipe@axondata.se 2003-12-15 Initial 32 | \endverbatim 33 | */ 34 | #include 35 | #include "TBits.h" 36 | #include "CPipeSHA1.h" 37 | 38 | namespace AxPipe { 39 | namespace Stock { 40 | /// \brief Calculate HMAC-SHA1-128 or 160 from a data-stream 41 | /// 42 | /// Define the bitlength in the template instantiation. 43 | template class CPipeHMAC_SHA1 : public CPipeSHA1 { 44 | TBits<160> m_HMAC; ///< HMAC intermediate 45 | TBits m_Key; ///< The key provied in Init() 46 | size_t m_cbOffset; ///< Offset from where to start HMAC'ing. 47 | void XorPad(unsigned char oPad);///< Helper for the inner and outer padding and Xor 48 | protected: 49 | void Out(CSeg* pSeg); ///< Hash and pass onwards 50 | bool OutOpen(); ///< Do the inner wrap 51 | bool OutClose(); ///< Do the outer wrap 52 | public: 53 | /// \brief Initialize the key and possibly an offset when to start HMAC'ing 54 | CPipeHMAC_SHA1* Init(TBits* pKey, size_t cbOffset = 0); 55 | }; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /XecretsFile2Go/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by XecretsFile2GoWin.rc 4 | // 5 | #define IDD_ABOUTBOX 100 6 | #define IDD_DECRYPT_PASSPHRASE 101 7 | #define IDD_ENCRYPT_PASSPHRASE 102 8 | #define ID_COMBO_GO 103 9 | #define ID_VIEW_DETAILS 104 10 | #define ID_VIEW_ICONS 105 11 | #define ID_VIEW_LIST 106 12 | #define ID_VIEW_SMALL_ICONS 107 13 | #define ID_VIEW_SORT_ATTR 108 14 | #define ID_VIEW_SORT_NAME 109 15 | #define ID_VIEW_SORT_SIZE 110 16 | #define ID_VIEW_SORT_TIME 111 17 | #define ID_VIEW_SORT_TYPE 112 18 | #define IDR_MAINFRAME 113 19 | #define IDR_MAINFRAME_X 113 20 | #define IDS_AXX 114 21 | #define IDS_ID_XECRETSFILE2GO 115 22 | #define IDT_GOGREEN 200 23 | #define IDT_GOGREY 201 24 | #define IDD_PROGRESS 202 25 | #define IDC_BTN_KEYFILE 1000 26 | #define IDC_EDIT_KEYFILENAME 1001 27 | #define IDC_EDIT_PASSPHRASE_1 1002 28 | #define IDC_EDIT_PASSPHRASE_2 1003 29 | #define IDC_STATIC_CHK_CACHE_D 1004 30 | #define IDC_STATIC_CHK_CACHE_E 1005 31 | #define IDC_STATIC_ENTER_PASSPHRASE 1006 32 | #define IDC_STATIC_GRP_KEYFILE 1007 33 | #define IDC_STATIC_GRP_PASSPHRASE 1008 34 | #define IDC_STATIC_VERIFY 1009 35 | #define IDC_GETXECRETSFILE 1010 36 | #define IDC_ABOUTMSG 1011 37 | #define IDC_COPYRIGHT 1012 38 | #define IDC_PROGRESS1 1013 39 | #define IDC_PROGRESS 1013 40 | #define IDC_FILENAME 1015 41 | #define ID_FILE_NEW_WINDOW 32766 42 | #define ID_VIEW_ADDRESS_BAR 32767 43 | #define ID_BUTTON32768 32768 44 | #define ID_BUTTON32769 32769 45 | #define ID_BUTTON32770 32770 46 | 47 | // Next default values for new objects 48 | // 49 | #ifdef APSTUDIO_INVOKED 50 | #ifndef APSTUDIO_READONLY_SYMBOLS 51 | #define _APS_NEXT_RESOURCE_VALUE 203 52 | #define _APS_NEXT_COMMAND_VALUE 32771 53 | #define _APS_NEXT_CONTROL_VALUE 1016 54 | #define _APS_NEXT_SYMED_VALUE 116 55 | #endif 56 | #endif 57 | -------------------------------------------------------------------------------- /AxPipe/Examples.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | /*! \file 3 | \brief Copying examples and patterns, CFilterNop, CJoinInterleave 4 | 5 | @(#) $Id$ 6 | 7 | AxPipe - Binary Stream Framework 8 | 9 | Copyright (C) 2003-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:axpipe@axondata.se and http://axpipe.sourceforge.net 24 | 25 | Why is this framework released as GPL and not LGPL? 26 | See http://www.gnu.org/philosophy/why-not-lgpl.html 27 | 28 | ---- 29 | \verbatim 30 | Examples.h Copying examples and patterns 31 | 32 | E-mail YYYY-MM-DD Reason 33 | axpipe@axondata.se 2003-11-23 Initial 34 | \endverbatim 35 | */ 36 | #include "stdafx.h" 37 | 38 | #include "../AxWinLib/AxAssert.h" 39 | #define AXLIB_ASSERT_FILE "Examples.h" 40 | 41 | /// \brief A sample CFilter derived class that just let's the data through 42 | /// 43 | /// Use this class as an example to derive further from, modifying the InFilter() 44 | /// implementation as appropriate. 45 | class CFilterNop : public AxPipe::CFilter { 46 | protected: 47 | void InFilter(); ///< A no-operation implementation of InFilter() 48 | }; 49 | 50 | /// \brief Sample CJoin 51 | /// 52 | /// This is a copying pattern example to use to create CJoin based 53 | /// derivations. It reads segments of data from a number of streams 54 | /// and interleaves them in the output. It's actually rather uncontrolled, 55 | /// since the size of the segments provided etc is up to respective stream 56 | /// but this is just a basic template. 57 | class CJoinInterleave : public AxPipe::CJoin { 58 | public: 59 | /// \brief The overridden In() 60 | AxPipe::CSeg* In(); 61 | }; 62 | -------------------------------------------------------------------------------- /AxWinLib/mygetopt.h: -------------------------------------------------------------------------------- 1 | #ifndef _GETOPT 2 | #define _GETOPT 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | GetOption.h Parse the command line, standard stuff. 26 | 27 | E-mail YYYY-MM-DD Reason 28 | support@axantum.com 2001 Initial 29 | 2003-05-26 Switch to Hans Dietrich XGetopt. Thanks! 30 | 31 | */ 32 | // XGetopt.h Version 1.2 33 | // 34 | // Author: Hans Dietrich 35 | // hdietrich2@hotmail.com 36 | // 37 | // This software is released into the public domain. 38 | // You are free to use it in any way you like. 39 | // 40 | // This software is provided "as is" with no expressed 41 | // or implied warranty. I accept no liability for any 42 | // damage or loss of business that this software may cause. 43 | // 44 | /////////////////////////////////////////////////////////////////////////////// 45 | 46 | #ifndef _MSC_VER 47 | 48 | #ifndef TCHAR 49 | #define TCHAR char 50 | #endif 51 | #ifndef _TCHAR 52 | #define _TCHAR char 53 | #endif 54 | #ifndef _T 55 | #define _T(x) x 56 | #endif 57 | #ifndef NULL 58 | #define NULL (0) 59 | #endif 60 | #ifndef _tcscmp 61 | #define _tcscmp strcmp 62 | #endif 63 | #ifndef _tcschr 64 | #define _tcschr strchr 65 | #endif 66 | 67 | #else 68 | #include 69 | #endif 70 | 71 | #include 72 | 73 | extern int optind, opterr; 74 | extern TCHAR* optarg; 75 | 76 | TCHAR mygetopt(int argc, TCHAR* argv[], TCHAR* optstring); 77 | 78 | #endif -------------------------------------------------------------------------------- /XecretsFileClassic/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by XecretsFileClassic.rc 4 | // 5 | #define IDD_ENTERPASSPHRASE 102 6 | #define IDD_OLDNEWPASSPHRASE 103 7 | #define IDD_EMPTY 109 8 | #define IDD_LICENSE 109 9 | #define IDD_WARNING 113 10 | #define IDD_PROGRESS 114 11 | #define IDD_DIALOG1 123 12 | #define IDD_NEWPASSPHRASE 123 13 | #define IDD_DIALOG2 124 14 | #define IDD_PASSPHRASE 124 15 | #define IDD_OLD2PASSPHRASE 125 16 | #define IDI_ICON1 130 17 | #define IDI_XECRETSFILE 130 18 | #define IDD_REGISTRATION 132 19 | #define IDC_PASSPHRASE 1000 20 | #define IDC_NEWPASSPHRASE1 1001 21 | #define IDC_PASSPHRASE2 1002 22 | #define IDC_NEWPASSPHRASE2 1003 23 | #define IDC_ENTER_PASS 1005 24 | #define IDC_ENTER_VERIFY 1006 25 | #define IDS_FILENAME 1006 26 | #define IDC_CHECKCACHE 1007 27 | #define IDC_CHECKMSG 1008 28 | #define IDC_MSG 1010 29 | #define IDC_BUTTONKEYBROWSE 1011 30 | #define IDC_EDITKEYFILE 1014 31 | #define IDS_KEYFILENAME 1015 32 | #define IDC_KEYFILE 1016 33 | #define IDC_CHECKCACHE_D 1018 34 | #define IDC_CHECKCACHE_E 1019 35 | #define IDC_ENTER_SIGNATURE 1020 36 | #define IDC_LICENSEE 1021 37 | #define IDC_SIGNATURE 1022 38 | #define IDC_ENTER_LICENSEE 1023 39 | #define IDC_BADLIC 1024 40 | #define IDC_ERRICON 1025 41 | #define IDC_ENTER_REGISTRATION 1026 42 | #define IDC_ENTERREGISTRATION 1026 43 | #define IDC_REGISTRATIONEMAIL 1027 44 | #define IDC_HOMEPAGE 1030 45 | #define IDC_STATIC -1 46 | #define IDC_REGISTRATIONPROMPT -1 47 | 48 | // Next default values for new objects 49 | // 50 | #ifdef APSTUDIO_INVOKED 51 | #ifndef APSTUDIO_READONLY_SYMBOLS 52 | #define _APS_NO_MFC 1 53 | #define _APS_NEXT_RESOURCE_VALUE 132 54 | #define _APS_NEXT_COMMAND_VALUE 40002 55 | #define _APS_NEXT_CONTROL_VALUE 1031 56 | #define _APS_NEXT_SYMED_VALUE 101 57 | #endif 58 | #endif 59 | -------------------------------------------------------------------------------- /XecretsFileShellExt/XecretsFileShellExt.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | Header Files 46 | 47 | 48 | 49 | 50 | Resource Files 51 | 52 | 53 | 54 | 55 | Resource Files 56 | 57 | 58 | Resource Files 59 | 60 | 61 | Resource Files 62 | 63 | 64 | Source Files 65 | 66 | 67 | -------------------------------------------------------------------------------- /XecretsFileCommon/CRegistry.h: -------------------------------------------------------------------------------- 1 | #ifndef _CREGISTRY 2 | #define _CREGISTRY 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | CRegistry.h Registry manipulating class 26 | 27 | E-mail YYYY-MM-DD Reason 28 | support@axantum.com 2002-08-17 Rel 1.2.1 Initial 29 | */ 30 | // 31 | // Helper class to work with the registry. Throws TAssert on error. 32 | // 33 | class CRegistry { 34 | HKEY m_hRegKey; 35 | HKEY m_hRootKey; 36 | LPTSTR m_szValueName; 37 | public: 38 | CRegistry(HKEY hRootKey = NULL, LPCTSTR szKey = NULL, LPCTSTR szValue = NULL); 39 | ~CRegistry(); 40 | 41 | CRegistry& Root(HKEY hRootKey); 42 | CRegistry& Key(LPCTSTR szKey); 43 | CRegistry& HKey(HKEY hKey); 44 | CRegistry& CreateKey(LPCTSTR szKeyFormat, LPCTSTR szFillIn = _T("")); 45 | CRegistry& Value(LPCTSTR szValue); 46 | 47 | HKEY GetHKey() { return m_hRegKey; } 48 | 49 | DWORD GetDword(DWORD dwDefault = 0); 50 | void SetDword(DWORD dwValue); 51 | 52 | void *GetBinary(int *nLen = NULL); 53 | void SetBinary(void *vData, int nLen); 54 | 55 | LPTSTR GetSz(LPCTSTR szDefault = _T("")); 56 | void SetSz(LPCTSTR szValue); 57 | void SetSz(LPCTSTR szValueFormat, LPCTSTR szFillIn); 58 | 59 | void DelValue(); 60 | 61 | static void DelSubHKey(HKEY hKey, LPCTSTR szSubKey); 62 | void DelSubKey(LPCTSTR szSubKey); 63 | static void DelSubHKeyRecurse(HKEY hKey, LPCTSTR szSubKey); 64 | void DelSubKeyRecurse(LPCTSTR szSubKey); 65 | }; 66 | #endif -------------------------------------------------------------------------------- /XecretsFileShellExt/XecretsFileShellExtInit.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | @(#) $Id$ 3 | 4 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 5 | Server or Web Storage of Document Files. 6 | 7 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 8 | 9 | This program is free software; you can redistribute it and/or modify it under the terms 10 | of the GNU General Public License as published by the Free Software Foundation; 11 | either version 2 of the License, or (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 14 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | See the GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License along with this program; 18 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 19 | Boston, MA 02111-1307 USA 20 | 21 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 22 | ---- 23 | ShellExtensionInit.cpp IShellExtInit implementation 24 | 25 | E-mail YYYY-MM-DD Reason 26 | support@axantum.com 2001 Initial 27 | 2002-08-07 Rel 1.2 28 | 29 | */ 30 | #include "StdAfx.h" 31 | // 32 | // Initializes a property sheet extension, context menu extension, or drag-and-drop handler. 33 | // 34 | // Returns NOERROR if successful, or an OLE-defined error value otherwise. 35 | // pidlFolder 36 | // Address of an ITEMIDLIST structure that uniquely identifies a folder. 37 | // For property sheet extensions, this parameter is NULL. For context menu extensions, 38 | // it is the item identifier list for the folder that contains the item whose context 39 | // menu is being displayed. For nondefault drag-and-drop menu extensions, 40 | // this parameter specifies the target folder. (This seems to be untrue - I get 41 | // no pidl to folder for my context menu extension... :-( /SS). 42 | // lpdobj 43 | // Address of anIDataObject interface object that can be used to retrieve 44 | // the objects being acted upon. 45 | // hkeyProgID 46 | // Registry key for the file object or folder type. 47 | // 48 | STDMETHODIMP 49 | CShellExt::Initialize(LPCITEMIDLIST pidlFolder, IDataObject* pdObj, HKEY hkeyProgID) { 50 | try { 51 | m_pSelection->SetObject(pdObj); // Save the selection object reference for later 52 | } 53 | catch (TAssert utErr) { 54 | utErr.Show(); 55 | return E_UNEXPECTED; 56 | } 57 | return NOERROR; 58 | } -------------------------------------------------------------------------------- /Build/Build.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | {11713887-b16f-4464-93c2-572da08d9fc1} 18 | 19 | 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | 29 | XecretsFileConfig 30 | 31 | 32 | Resource Files 33 | 34 | 35 | XecretsFileConfig 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | Source Files 46 | 47 | 48 | XecretsFileConfig 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | Source Files 57 | 58 | 59 | 60 | 61 | Header Files 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /XecretsFile2Go/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | // This is a Windows-specific include - Generic definitions should not be here 6 | // 7 | 8 | #ifndef __STDAFX_H__ 9 | #define __STDAFX_H__ 10 | 11 | #if _MSC_VER > 1000 12 | #pragma once 13 | #endif // _MSC_VER > 1000 14 | 15 | #ifndef WINVER 16 | #define WINVER 0x0600 // Allow use of features specific to Windows Vista or later. 17 | #endif 18 | 19 | #ifndef _WIN32_WINNT 20 | #define _WIN32_WINNT 0x0600 // Allow use of features specific to Windows Vista or later. 21 | #endif 22 | 23 | #ifndef _WIN32_IE 24 | #define _WIN32_IE 0x0600 // Specifies that the minimum required platform is Internet Explorer 6.0. 25 | #endif 26 | 27 | #define _RICHEDIT_VER 0x0300 28 | //#define _SECURE_ATL 1 29 | #define _CRT_RAND_S 30 | 31 | #include 32 | #include 33 | #include 34 | //#include 35 | #include 36 | #include 37 | 38 | // 39 | #define CRTDBG_MAP_ALLOC 40 | #include 41 | #include 42 | 43 | #include 44 | #include "atlapp.h" 45 | #include 46 | #include "atlframe.h" // WTL frame window classes 47 | #include "atlsplit.h" 48 | #include "atlmisc.h" // WTL utility classes like CString 49 | #include "atlctrls.h" 50 | #include "atlctrlw.h" 51 | #include "atlctrlx.h" 52 | #include "atlcrack.h" // WTL enhanced msg map 53 | #include "atlddx.h" 54 | #include "atldlgs.h" 55 | 56 | #include 57 | 58 | #include "..\XecretsFileCommon\Oem.h" 59 | #include "Axgettext.h" 60 | #include "CConfigWin.h" 61 | 62 | // Gettext definitions 63 | // This should probably be fetched from a string resource instead for OEM-purposes in the future 64 | #define GETTEXT_PACKAGE "XecretsFile2Go" 65 | #define _(String) AxLib::CGettext::Gettext (String) 66 | #define N_(String) String 67 | 68 | enum { 69 | MENU_DUMMY, 70 | MENU_FILE_OPEN, 71 | MENU_FILE_ENCRYPT, 72 | MENU_FILE_DECRYPT, 73 | MENU_FILE_EXIT, 74 | MENU_VIEW_LARGEICONS, 75 | MENU_VIEW_SMALLICONS, 76 | MENU_VIEW_LIST, 77 | MENU_VIEW_DETAILS, 78 | MENU_VIEW_REFRESH, 79 | MENU_HELP_ABOUT, 80 | }; 81 | 82 | extern const _TCHAR* GetComMsg(HRESULT hr); 83 | #ifndef ASSCOM 84 | /// \brief Assert the HRESULT from a COM operation 85 | /// }param hResult A HRESULT from a COM operation 86 | #define ASSCOM(hResult) if (FAILED(hResult)) AxLib::AssFunc(false, GetComMsg(hResult), _T(AXLIB_ASSERT_FILE), __LINE__) 87 | #endif 88 | 89 | #endif //__STDAFX_H__ -------------------------------------------------------------------------------- /XecretsFileClassic/CCryptoHeap.h: -------------------------------------------------------------------------------- 1 | #ifndef _CCRYPTOHEAP 2 | #define _CCRYPTOHEAP 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | CCryptoHeap.h A heap to be placed in a memory map 26 | 27 | E-mail YYYY-MM-DD Reason 28 | support@axantum.com 2001 Initial 29 | 30 | */ 31 | #include "CFile.h" 32 | // 33 | // CCryptoHeap.h - Reasonably secure memory storage for passwords 34 | // 35 | #define USED 1 36 | 37 | // The overhead - the size of the block, including the overhead it-self. 38 | // end of the chain is signalled by a zero. 39 | typedef struct { 40 | size_t size; 41 | } UNIT; 42 | 43 | #ifdef _DEBUG 44 | class CHeapCheck; // forward 45 | #endif 46 | 47 | class CCryptoHeap : public CFileIO { 48 | #ifdef _DEBUG 49 | friend CHeapCheck; 50 | #endif _DEBUG 51 | 52 | friend void* basenew(size_t); 53 | friend void operator delete(void*); 54 | 55 | CRITICAL_SECTION csThreadLock; 56 | UNIT* free; 57 | UNIT* heap; 58 | UNIT* compact(UNIT* p, size_t nsize); 59 | UNIT* reuse(UNIT* p, size_t nsize); 60 | BOOL* m_pfHeapValid; // Static marker to ensure proper heap access 61 | public: 62 | size_t m_stHeapLen; // The length of the heap to allocate. 63 | private: 64 | 65 | void Free(void* ptr); 66 | void* Alloc(size_t size); 67 | void Compact(void); 68 | 69 | HANDLE m_hMapping; // The mapping, which always maps the entire file 70 | DWORD m_nWipePasses; ///< We need to keep this around for the destructor 71 | public: 72 | CCryptoHeap(size_t len, BOOL* pfHeapValid); 73 | ~CCryptoHeap(); 74 | void Init(); // Actually init and allocate it.. 75 | size_t CurrentAlloc(); 76 | }; 77 | 78 | #endif _CCRYPTOHEAP -------------------------------------------------------------------------------- /XecretsFileCommon/CSubKey.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | @(#) $Id$ 3 | 4 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 5 | Server or Web Storage of Document Files. 6 | 7 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 8 | 9 | This program is free software; you can redistribute it and/or modify it under the terms 10 | of the GNU General Public License as published by the Free Software Foundation; 11 | either version 2 of the License, or (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 14 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | See the GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License along with this program; 18 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 19 | Boston, MA 02111-1307 USA 20 | 21 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 22 | ---- 23 | CSubKey.cpp Generate subkeys from a master key. 24 | 25 | E-mail YYYY-MM-DD Reason 26 | support@axantum.com 2001 Initial 27 | 28 | */ 29 | // 30 | // Generate subkeys for various uses. This class has two main purposes: 31 | // 32 | // 1 - to avoid conflicts caused by using the same subkey in different contexts. 33 | // 2 - to isolate knowledge of relationship between key-size and block-size. 34 | // 35 | // Exposing one or more subkeys must not endanger either the other subkeys, or the 36 | // master key. In fact, the eValidator key is exposed in the file, and never used 37 | // for actual encryption. 38 | // 39 | // We actually do is to encrypt constants using the master key, until we get enough 40 | // bits for a key. 41 | // 42 | #include "stdafx.h" 43 | #include "CSubKey.h" 44 | #include "CAes.h" 45 | 46 | #include "../AxWinLib/AxAssert.h" 47 | #define AXLIB_ASSERT_FILE "CSubKey.cpp" 48 | 49 | CSubKey::CSubKey() { 50 | m_pSubKey = new TKey; 51 | ASSPTR(m_pSubKey); 52 | } 53 | 54 | CSubKey::~CSubKey() { 55 | delete m_pSubKey; 56 | } 57 | 58 | CSubKey& 59 | CSubKey::Set(TKey* pMasterKey, etSubKey eSubKey) { 60 | TBlock utSubKeyData(eSubKey); 61 | CAes utCAesCtx(pMasterKey, CAes::eECB, CAes::eEncrypt); 62 | 63 | // We know that a TBlock and a TKey is of the same size... Change here if this 64 | // changes, or you want to write solid code... 65 | utCAesCtx.Xblock(&utSubKeyData, (TBlock*)m_pSubKey); 66 | 67 | return *this; 68 | } 69 | 70 | TKey* 71 | CSubKey::Get() { 72 | return m_pSubKey; 73 | } -------------------------------------------------------------------------------- /XecretsFileCommon/CFmtMsg.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | @(#) $Id$ 3 | 4 | The purpose of this class is to encapsulate functionality for dynamically 5 | allocating strings that is the result for printf-like functionality. I'm 6 | not sure how this should be done portably for a MacIntosh or Unix-platform... 7 | 8 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 9 | 10 | This program is free software; you can redistribute it and/or modify it under the terms 11 | of the GNU General Public License as published by the Free Software Foundation; 12 | either version 2 of the License, or (at your option) any later version. 13 | 14 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 15 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 | See the GNU General Public License for more details. 17 | 18 | You should have received a copy of the GNU General Public License along with this program; 19 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 20 | Boston, MA 02111-1307 USA 21 | 22 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 23 | ---- 24 | CFmtMsg.cpp Actions on temporary files and directories 25 | 26 | E-mail YYYY-MM-DD Reason 27 | support@axantum.com 2002-10-07 Initial 28 | 29 | */ 30 | #include "stdafx.h" 31 | 32 | #include "CFmtMsg.h" 33 | 34 | CFmtMsg::CFmtMsg(const TCHAR* szMsg, ...) : m_szFmtMsg(NULL) { 35 | va_list vaArgs; 36 | va_start(vaArgs, szMsg); 37 | FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | 38 | FORMAT_MESSAGE_FROM_STRING, 39 | szMsg, 0, 0, (TCHAR*)&m_szFmtMsg, 0, &vaArgs); 40 | va_end(vaArgs); 41 | } 42 | 43 | CFmtMsg::CFmtMsg(CFmtMsg& fmtmsg) : m_szFmtMsg(NULL) { 44 | if (fmtmsg.m_szFmtMsg) { 45 | size_t ccFmtMsg = _tcslen(fmtmsg.m_szFmtMsg) + 1; 46 | m_szFmtMsg = (TCHAR*)LocalAlloc(0, ccFmtMsg * sizeof * m_szFmtMsg); 47 | _tcscpy_s(m_szFmtMsg, ccFmtMsg, fmtmsg.m_szFmtMsg); 48 | } 49 | } 50 | 51 | CFmtMsg::CFmtMsg(void) : m_szFmtMsg(NULL) { 52 | } 53 | 54 | void 55 | CFmtMsg::Fmt(const TCHAR* szMsg, ...) { 56 | va_list vaArgs; 57 | va_start(vaArgs, szMsg); 58 | FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | 59 | FORMAT_MESSAGE_FROM_STRING, 60 | szMsg, 0, 0, (TCHAR*)&m_szFmtMsg, 0, &vaArgs); 61 | va_end(vaArgs); 62 | } 63 | 64 | CFmtMsg::~CFmtMsg() { 65 | if (m_szFmtMsg) { 66 | LocalFree(m_szFmtMsg); 67 | } 68 | } 69 | 70 | TCHAR* CFmtMsg::Get() { 71 | if (m_szFmtMsg) { 72 | return m_szFmtMsg; 73 | } 74 | else { 75 | return _T(""); 76 | } 77 | } -------------------------------------------------------------------------------- /XecretsFileCommon/CFileName.h: -------------------------------------------------------------------------------- 1 | #ifndef _CFILENAME 2 | #define _CFILENAME 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | CFileName.h File name related utility operations. 26 | 27 | E-mail YYYY-MM-DD Reason 28 | support@axantum.com 2001 Initial 29 | 2001-12-01 Added CTempDir 30 | 31 | */ 32 | // 33 | // File Name Operation Routines 34 | // 35 | class CFileName { 36 | public: 37 | CFileName(); 38 | CFileName(LPCTSTR szFileName); 39 | 40 | CFileName& SetPath2ExeName(HINSTANCE hInstance = NULL); 41 | CFileName& SetPath2TempDir(); 42 | CFileName& SetPath2SysTempDir(); 43 | CFileName& SetName(LPCTSTR szFileName); 44 | CFileName& SetExt(LPCTSTR szExt); 45 | CFileName& SetTitle(LPCTSTR szTitle); 46 | CFileName& SetDir(LPCTSTR szDir); 47 | CFileName& SetDrive(LPCTSTR szDrive); 48 | CFileName& Set(LPCTSTR szFullName); 49 | CFileName& SetCurDir(LPCTSTR szCurDir); 50 | CFileName& Override(LPCTSTR szPath); 51 | 52 | CFileName& DashExt(); ///< Convert dot to dash in extension. 53 | CFileName& DelExt(); 54 | CFileName& AddExt(LPCTSTR szExt); 55 | CFileName& AddName(LPCTSTR szName); 56 | 57 | LPCTSTR Get(); 58 | LPCTSTR GetDir(); 59 | LPCTSTR GetRootDir(); 60 | LPCTSTR GetName(); 61 | LPCTSTR GetExt(); 62 | LPCTSTR GetTitle(); 63 | LPCTSTR GetQuoted(); 64 | 65 | protected: 66 | void Split(LPCTSTR szFileName); 67 | 68 | TCHAR m_szWorkName[_MAX_PATH + sizeof TCHAR * 2]; // Room for quotes as well. 69 | TCHAR m_szDrive[_MAX_DRIVE]; 70 | TCHAR m_szDir[_MAX_DIR]; 71 | TCHAR m_szName[_MAX_FNAME]; 72 | TCHAR m_szExt[_MAX_EXT]; 73 | }; 74 | #endif _CFILENAME -------------------------------------------------------------------------------- /AxSigLib/CLicMgr.h: -------------------------------------------------------------------------------- 1 | #ifndef CLICMGR_H 2 | #define CLICMGR_H 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2004-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | CLicMgr.h Manage licenses 26 | */ 27 | #include "SVerify.h" 28 | #include "Base34Dec.h" 29 | #include 30 | 31 | using namespace std; 32 | 33 | class CLicMgr { 34 | // Total of 183 bits gives us 36 characters in Base 34 for signatures. 35 | // These are hard-coded parameters and must match what is in AxKeyGen. They should probably 36 | // live in a common header file, but... 37 | static const unsigned int ShortRbits = 55;// The shortened hash 38 | static const int SBits = 128; // The size of the s parameter from the elliptic curve used 39 | SHORTVERIFY > m_Verifier; 40 | 41 | map m_smspValidLic; // A map of validated license types along with the info 42 | axpl::ttstring m_sLastErrorMsg; // The last error message... 43 | public: 44 | CLicMgr() {} 45 | CLicMgr(const axpl::ttstring& sVerifierHex) { 46 | SetVerifier(sVerifierHex); 47 | } 48 | axpl::ttstring GetLastErrorMsg() { 49 | return m_sLastErrorMsg; 50 | } 51 | /// \brief Set the public key to use 52 | void SetVerifier(const axpl::ttstring& sVerifierHex); 53 | /// \brief Add a specified license type after checking the sig for the licensee 54 | bool AddChkType(const axpl::ttstring& sType, const axpl::ttstring& sLicensee, const axpl::ttstring& sSig); 55 | /// \brief Check if we have a valid license for a given type 56 | bool ChkType(const axpl::ttstring& sType); 57 | /// \brief Get a valid license, if any, for a given type 58 | ttstringpair GetType(const axpl::ttstring& sType); 59 | }; 60 | #endif -------------------------------------------------------------------------------- /AxSigLib/CRestrictMgr.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | @(#) $Id$ 3 | 4 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 5 | Server or Web Storage of Document Files. 6 | 7 | Copyright (C) 2004-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 8 | 9 | This program is free software; you can redistribute it and/or modify it under the terms 10 | of the GNU General Public License as published by the Free Software Foundation; 11 | either version 2 of the License, or (at your option) any later version. 12 | 13 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 14 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 15 | See the GNU General Public License for more details. 16 | 17 | You should have received a copy of the GNU General Public License along with this program; 18 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 19 | Boston, MA 02111-1307 USA 20 | 21 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 22 | ---- 23 | CRestrictMgr.cpp Handle and validate licenses 24 | */ 25 | #include "stdafx.h" 26 | #include "CRestrictMgr.h" 27 | 28 | #include "../AxWinLib/AxAssert.h" 29 | #define AXLIB_ASSERT_FILE "CRestrictMgr.cpp" 30 | 31 | /// \brief Set a restriction - empty string means remove restriction. 32 | void 33 | CRestrictMgr::Set(ttstring sRestrict, const ttstring sValue) { 34 | transform(sRestrict.begin(), sRestrict.end(), sRestrict.begin(), tolower); 35 | 36 | if (sValue.empty()) { 37 | if (Has(sRestrict)) { 38 | m_smRestrictions.erase(sRestrict); 39 | } 40 | } 41 | else { 42 | m_smRestrictions[sRestrict] = sValue; 43 | } 44 | } 45 | 46 | /// \brief Check if there is a restriction with that name at all 47 | bool 48 | CRestrictMgr::Has(ttstring sRestrict) { 49 | transform(sRestrict.begin(), sRestrict.end(), sRestrict.begin(), tolower); 50 | return m_smRestrictions.find(sRestrict) != m_smRestrictions.end(); 51 | } 52 | 53 | /// \brief Get the restriction as a string. Must exist. 54 | const 55 | ttstring& 56 | CRestrictMgr::GetStr(ttstring sRestrict) { 57 | ASSCHK(Has(sRestrict), _T("Restriction must exist to get it!")); 58 | transform(sRestrict.begin(), sRestrict.end(), sRestrict.begin(), tolower); 59 | return m_smRestrictions[sRestrict]; 60 | } 61 | 62 | /// \brief Get the restriction interpreted as an integer. Must exist. 63 | int 64 | CRestrictMgr::GetInt(ttstring sRestrict) { 65 | ASSCHK(Has(sRestrict), _T("Restriction must exist to get it!")); 66 | transform(sRestrict.begin(), sRestrict.end(), sRestrict.begin(), tolower); 67 | return atoi(t2s(m_smRestrictions[sRestrict]).c_str()); 68 | } -------------------------------------------------------------------------------- /XecretsFileClassic/AxConfig.h: -------------------------------------------------------------------------------- 1 | #ifndef _AXCONFIG 2 | #define _AXCONFIG 3 | /* 4 | @(#) $Id$ 5 | 6 | Xecrets File Classic - Compressing and Encrypting Wrapper and Application Launcher for Secure Local, 7 | Server or Web Storage of Document Files. 8 | 9 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 10 | 11 | This program is free software; you can redistribute it and/or modify it under the terms 12 | of the GNU General Public License as published by the Free Software Foundation; 13 | either version 2 of the License, or (at your option) any later version. 14 | 15 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 16 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 17 | See the GNU General Public License for more details. 18 | 19 | You should have received a copy of the GNU General Public License along with this program; 20 | if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 21 | Boston, MA 02111-1307 USA 22 | 23 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 24 | ---- 25 | AxConfig.h Some constants and version numbers etc 26 | 27 | E-mail YYYY-MM-DD Reason 28 | support@axantum.com 2001 Initial 29 | 30 | */ 31 | // Define to use VC's debug heap instead. 32 | //#define _DEBUGHEAP 33 | 34 | #define MAX_PASSPHRASE_LEN 250 35 | #define KEY_WRAP_ITERATIONS 10000 // The standard says 6... 36 | // 37 | // As the heap is one view of a memory mapped file, the MAX_VIEW_SIZE must be large 38 | // enough to hold the required heap. 39 | // 40 | // The code will ensure that MAX_VIEW_SIZE is rounded down to a multiple of qwAllocationGranularity (usually 64k) 41 | // 42 | // Use small values in debug, large values for effiency in release builds. 43 | // 44 | // As of Beta 5, 2001-12-16, Each active instance of Xecrets File Classic requires approx 1K of secure heap. 45 | // 46 | #ifdef _DEBUG 47 | #define MAX_VIEW_SIZE (64*1024) 48 | #define COMPRESS_TEST_SIZE (1024*1024) 49 | #define SECURE_HEAP_SIZE (128*1024) 50 | #else 51 | #define MAX_VIEW_SIZE (2*1024*1024) 52 | // Empirical tests have shown that this order of magnitude is necessary 53 | // to get reasonable figures for media files and other compressed files. 54 | #define COMPRESS_TEST_SIZE (1024*1024) 55 | #define SECURE_HEAP_SIZE (1024*1024) 56 | #endif _DEBUG 57 | 58 | // Consider compression worthwhile at x% and higher compression. 59 | #define COMPRESS_THRESHOLD 20 60 | 61 | // Define how frequently we insert a full flush, for robustness 62 | #ifdef _DEBUG 63 | #define ZLIB_FULL_FLUSH_SIZE 0x10000 64 | #else 65 | #define ZLIB_FULL_FLUSH_SIZE 0x10000 66 | #endif 67 | 68 | #if !defined(_DEBUGHEAP) && defined(_DEBUG) 69 | extern __declspec(thread) size_t tguiAlloc; 70 | #endif 71 | 72 | #endif _AXCONFIG -------------------------------------------------------------------------------- /AxSigLib/SSign.h: -------------------------------------------------------------------------------- 1 | #ifndef AXSIGLIB_SECDSA_SSIGN_H 2 | #define AXSIGLIB_SECDSA_SSIGN_H 3 | /*! \file 4 | \brief AxSigLib - Short Elliptic Curve Digital Signature Algorithm et. al. 5 | 6 | @(#) $Id$ 7 | 8 | The SECDSA Signer 9 | 10 | Copyright (C) 2001-2025 Svante Seleborg/Axantum Software AB. All rights reserved. 11 | 12 | The author may be reached at mailto:support@axantum.com and http://www.axantum.com 13 | --- 14 | */ 15 | 16 | #include "secdsa.h" 17 | 18 | template class SHORTSIGN : public SSS::Signer, public Canonicalize { 19 | public: 20 | SHORTSIGN() : SSS::Signer() {} 21 | SHORTSIGN(BufferedTransformation& bt) : SSS::Signer(bt) {} 22 | 23 | /// \brief Calculate actual signature length 24 | /// There is a potential problem here... If this is used inside the class for purposes 25 | /// of memory allocation, we're in trouble as it's virtual. Not sure if it really should 26 | /// be, but that's the way it is - and it does appear that currently it's not used 27 | /// from base classes for that purpose. Presumably MaxSignatureLength() serves that 28 | /// purpose, but the documentation for the library somewhat brief. (Sarcasm intended). 29 | virtual unsigned int SignatureLength() const { 30 | return ((SSS::Rbits() - 1) / 8) + 1 31 | + GetSignatureAlgorithm().SLen(this->GetAbstractGroupParameters()); 32 | } 33 | 34 | //! maximum signature length produced for a given length of recoverable message part 35 | virtual unsigned int MaxSignatureLength(unsigned int recoverablePartLength = 0) const { 36 | return max(SignatureLength(), SSS::Signer::MaxSignatureLength(recoverablePartLength)); 37 | } 38 | 39 | unsigned int SignAndRestart(RandomNumberGenerator& rng, PK_MessageAccumulator& messageAccumulator, byte* signature, bool restart) const { 40 | // Allocate a temp buffer for the inner signature 41 | SecByteBlock largesig(SSS::Signer::SignatureLength()); 42 | 43 | // Do the inner signature, the siglen returned is our own siglen since SignatureLength() is virtual... 44 | unsigned int siglen = SSS::Signer::SignAndRestart(rng, messageAccumulator, largesig, restart); 45 | 46 | unsigned int rLen = GetSignatureAlgorithm().RLen(this->GetAbstractGroupParameters()); 47 | unsigned int sLen = GetSignatureAlgorithm().SLen(this->GetAbstractGroupParameters()); 48 | 49 | // Unpack r and s again into Integer's. 50 | Integer r, s; 51 | r.Decode(largesig, rLen); 52 | s.Decode(largesig + rLen, sLen); 53 | 54 | // Now prepare a compact representation, where we shorten r to RBITS, and the shift it 55 | // up just above r in one compact Integer. 56 | 57 | Integer sr = r; 58 | 59 | sr += s << SSS::Rbits(); 60 | sr.Encode(signature, SignatureLength()); 61 | 62 | //this->GetAbstractGroupParameters().GetGroupOrder().BitCount() 63 | //memcpy(signature, largesig, siglen); 64 | return siglen; 65 | }; 66 | }; 67 | 68 | #endif 69 | -------------------------------------------------------------------------------- /XecretsFileLib/XecretsFileLib.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | Source Files 23 | 24 | 25 | Source Files 26 | 27 | 28 | Source Files 29 | 30 | 31 | Source Files 32 | 33 | 34 | Source Files 35 | 36 | 37 | Source Files 38 | 39 | 40 | Source Files 41 | 42 | 43 | Source Files 44 | 45 | 46 | 47 | 48 | Header Files 49 | 50 | 51 | Header Files 52 | 53 | 54 | Header Files 55 | 56 | 57 | Header Files 58 | 59 | 60 | Header Files 61 | 62 | 63 | Header Files 64 | 65 | 66 | Header Files 67 | 68 | 69 | Header Files 70 | 71 | 72 | Header Files 73 | 74 | 75 | --------------------------------------------------------------------------------