文件保存问题
我用下列代码把我的信息保存到Set.ini文件
现在任何人只要用记事本打开Set.ini文件就能看到我的信息,
请问专家如何加密保存?
const int SIZE = 256;
const TCHAR* INI_FILE = _T( "\\Set.ini" );
const TCHAR* SECTION_FILETYPE = _T( "FileType" );
const TCHAR* SEC_FILETYPESEL = _T( "FileTypeSelect" );
// Save the scan file type in the initialize file
TCHAR strPath[ SIZE ];
VERIFY( GetCurrentDirectory( SIZE, strPath ) );
TRACE( strPath );
CString strIniPath = strPath;
strIniPath += INI_FILE;
UpdateData();
if ( m_strFileDesc.IsEmpty() || m_strFileType.IsEmpty() )
{
AfxMessageBox( _T( "文件类型信息不完全 !" ), MB_ICONINFORMATION );
return;
}
WritePrivateProfileString( SECTION_FILETYPE, m_strFileType, m_strFileDesc, strIniPath );
WritePrivateProfileString( SEC_FILETYPESEL, m_strFileType, _T( "0" ), strIniPath );