|
|
1.1.1.9 root 1: /*
1.1.1.11 root 2: Legal Notice: Some portions of the source code contained in this file were
3: derived from the source code of Encryption for the Masses 2.02a, which is
4: Copyright (c) 1998-2000 Paul Le Roux and which is governed by the 'License
5: Agreement for Encryption for the Masses'. Modifications and additions to
6: the original source code (contained in this file) and all other portions of
7: this file are Copyright (c) 2003-2008 TrueCrypt Foundation and are governed
1.1.1.12 root 8: by the TrueCrypt License 2.5 the full text of which is contained in the
1.1.1.11 root 9: file License.txt included in TrueCrypt binary and source code distribution
1.1.1.9 root 10: packages. */
1.1 root 11:
1.1.1.9 root 12: #include "Password.h"
13:
14: #ifdef __cplusplus
15: extern "C" {
16: #endif
1.1 root 17:
1.1.1.7 root 18: #ifdef _WIN32
1.1.1.3 root 19:
20: // FMIFS
21: typedef BOOLEAN (__stdcall *PFMIFSCALLBACK)( int command, DWORD subCommand, PVOID parameter );
22: typedef VOID (__stdcall *PFORMATEX)( PWCHAR DriveRoot, DWORD MediaFlag, PWCHAR Format, PWCHAR Label, BOOL QuickFormat, DWORD ClusterSize, PFMIFSCALLBACK Callback );
23:
1.1.1.13! root 24: typedef struct
! 25: {
! 26: BOOL bDevice;
! 27: BOOL hiddenVol;
! 28: char *volumePath;
! 29: unsigned __int64 size;
! 30: unsigned __int64 hiddenVolHostSize;
! 31: int ea;
! 32: int pkcs5;
! 33: uint32 headerFlags;
! 34: int fileSystem;
! 35: int clusterSize;
! 36: BOOL sparseFileSwitch;
! 37: BOOL quickFormat;
! 38: int *realClusterSize;
! 39: Password *password;
! 40: HWND hwndDlg;
! 41: }
! 42: FORMAT_VOL_PARAMETERS;
! 43:
1.1.1.3 root 44: #define FMIFS_DONE 0xB
45: #define FMIFS_HARDDISK 0xC
1.1.1.7 root 46:
1.1.1.13! root 47: int FormatVolume (volatile FORMAT_VOL_PARAMETERS *volParams);
! 48: BOOL FormatNtfs (int driveNo, int clusterSize);
! 49:
1.1.1.7 root 50: #endif
51:
1.1.1.12 root 52: uint64 GetVolumeDataAreaSize (BOOL hiddenVolume, uint64 volumeSize);
1.1.1.7 root 53: int FormatNoFs (unsigned __int64 startSector, __int64 num_sectors, void *dev, PCRYPTO_INFO cryptoInfo, BOOL quickFormat);
54: BOOL WriteSector ( void *dev , char *sector , char *write_buf , int *write_buf_cnt , __int64 *nSecNo , PCRYPTO_INFO cryptoInfo );
1.1.1.12 root 55: BOOL FlushFormatWriteBuffer (void *dev, char *write_buf, int *write_buf_cnt, __int64 *nSecNo, PCRYPTO_INFO cryptoInfo);
1.1.1.7 root 56:
1.1.1.9 root 57: #define WRITE_BUF_SIZE 65536
1.1.1.7 root 58:
59: #define FILESYS_NONE 0
60: #define FILESYS_FAT 1
61: #define FILESYS_NTFS 2
1.1.1.9 root 62:
63: #ifdef __cplusplus
64: }
65: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.