A. C++编译加密软件用vc6.0的优点, vc6.0不是很老吗,为什么不用新的
主要是不需要运行库,界面简洁,体积小巧,还能输出makefile。
其它没有任何优点可言,无论是优化还是标准还是调试,vc6没有任何的优势可言。其它版本的安装完之后至少2G以上的空间占用,vs2012达到了8G。
B. 如何将VC 程序加密防盗
学名密钥盘,是当下软件保护的最好办法,有专门的外包供应商,在中国比较专业的例如飞天诚信,其盘能存储私钥,私钥不可导出。一般内部有硬件实现的哈希算法很公钥算法,能签名,校验,非常安全。在软件运行时不停监测密钥盘的存在,并校验口令。
换句话说,是软件就能破解,包括这种方式,就看破解成本的大小。可以修改程序完全绕过密钥盘。
软件保护的终极形态是把算法固化为硬件,灌参数运行。
另外在线激活是个不错的身份授权方式
C. 求 VC++编写的文件夹加密软件代码 (其他工具也可以)~~·求 文件夹 加密的啊~~不是文件加密
// AesCodeDlg.cpp : implementation file
//
#include "stdafx.h"
#include "AesCode.h"
#include "AesCodeDlg.h"
#include "Aes.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
class CAboutDlg : public CDialog
{
public:
CAboutDlg();
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum ;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAesCodeDlg dialog
CAesCodeDlg::CAesCodeDlg(CWnd* pParent /*=NULL*/)
: CDialog(CAesCodeDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CAesCodeDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
void CAesCodeDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAesCodeDlg)
DDX_Control(pDX, IDC_EnDeProg, m_prog);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAesCodeDlg, CDialog)
//{{AFX_MSG_MAP(CAesCodeDlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_BN_CLICKED(IDC_BAesEn, OnBAesEn)
ON_BN_CLICKED(IDC_BAesDe, OnBAesDe)
ON_BN_CLICKED(IDC_BFile, OnBFile)
ON_BN_CLICKED(IDC_BFileEn, OnBFileEn)
ON_BN_CLICKED(IDC_BFileDe, OnBFileDe)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAesCodeDlg message handlers
BOOL CAesCodeDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
// TODO: Add extra initialization here
SetDlgItemText(IDC_EAesEn,"0123456789abcdef");
EnDe_filename="";
m_prog.SetRange(0,100);
m_prog.SetPos(0);
return TRUE; // return TRUE unless you set the focus to a control
}
void CAesCodeDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.
void CAesCodeDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}
// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CAesCodeDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
////////////////////////////////////////////////////////////////////////////////////////////////
//Aes字符串加密
void CAesCodeDlg::OnBAesEn()
{
// TODO: Add your control notification handler code here
unsigned char inBuff[25],ouBuff[25];
memset(inBuff,0,25);
memset(ouBuff,0,25);
Aes aes(24,(unsigned char*)"\x0\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13\x14\x15\x16\x17");
GetDlgItemText(IDC_EAesEn,(char*)inBuff,24);
if(strlen((char*)inBuff)>16)MessageBox("本例只能加密16字节的字符串,大于截断");
aes.Cipher(inBuff,ouBuff); //因为输出为16个字节,每个字节用两个字母或数字表示。
CString str="",strTmp; //实际输出是32个字母或数字,否则ASCII码值超出127的会变成乱码。
for(int i=0;i<16;i++)
{
strTmp.Format("%02x",ouBuff[i]); //其实相当于把ouBuff的ASCII值这个数字以16进制的形式输出
str+=strTmp;
}
//MessageBox(str,"加密后");
SetDlgItemText(IDC_EAesEn,str);
}
////////////////////////////////////////////////////////////////////////////////////////////////
//Aes字符串解密
void CAesCodeDlg::OnBAesDe()
{
// TODO: Add your control notification handler code here
unsigned char inBuff[33],ouBuff[25]; //还是要注意32个字符的字符串需要用33个字节来存储,
//因为有个结束符,太恶心了
memset(inBuff,0,32);
memset(ouBuff,0,25);
Aes aes(24,(unsigned char*)"\x0\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf\x10\x11\x12\x13\x14\x15\x16\x17");
GetDlgItemText(IDC_EAesEn,(char*)inBuff,33);
unsigned char temp[25];
for(int j=0;j<16;j++)
{
temp[j]=char2num(inBuff[2*j])*16+char2num(inBuff[2*j+1]);// 将字符字面表示的16进制ASCII码值转换成真正的ASCII码值
}
aes.InvCipher(temp,ouBuff);//"dda97ca4......ec0d7191"
SetDlgItemText(IDC_EAesDe,CString(ouBuff));
}
////////////////////////////////////////////////////////////////////////////////////////////////
//字符ASCII码值到字符字面值的转换 如 '0'转换成0, 'a'转换成10
int CAesCodeDlg::char2num(char ch)
{
if(ch>='0'&&ch<='9')return ch-'0';
else if(ch>='a'&&ch<='f')return ch-'a'+10;
return -1;
}
////////////////////////////////////////////////////////////////////////////////////////////////
//文件选择框
void CAesCodeDlg::OnBFile()
{
// TODO: Add your control notification handler code here
CFileDialog fdlg(1,NULL,NULL,OFN_HIDEREADONLY ,"All Files(*.*)|*.*||");
if(IDOK!=fdlg.DoModal())return;
EnDe_filename=fdlg.GetPathName();
SetDlgItemText(IDC_EFile,EnDe_filename);
}
////////////////////////////////////////////////////////////////////////////////////////////////
//Aes文件加密
void CAesCodeDlg::OnBFileEn()
{
// TODO: Add your control notification handler code here
if(EnDe_filename=="")return;
FILE* finput;
FILE* foutput;
finput=fopen((LPCTSTR)EnDe_filename,"rb");
if(!finput)
{
MessageBox("文件打开错误","出错",MB_OK);
return;
}
fseek(finput,0,SEEK_END);
long lFileLen=ftell(finput); //ftell()函数返回文件位置指示符的当前值,即如果现在是在文件结尾,则这个值就是文件长度
fseek(finput,0,SEEK_SET);
long blocknum=lFileLen/16;
long leftnum=lFileLen%16;
EnDe_filename+=".en";
foutput=fopen((LPCTSTR)EnDe_filename,"wb");
if(!foutput)
{
MessageBox("文件打开错误","出错",MB_OK);
fclose(finput);
return;
}
unsigned char inBuff[25],ouBuff[25];
Aes aes(16,(unsigned char*)"\x0\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf");
for(long i=0;i<blocknum;i++)
{
fread(inBuff,1,16,finput); //读取16个对象,每个对象的长度是1字节
aes.Cipher(inBuff,ouBuff);
fwrite(ouBuff,1,16,foutput);
m_prog.SetPos(int(100*i/blocknum)); //加密进度条进度设置
}
if(leftnum)
{
memset(inBuff,0,16);
fread(inBuff,1,leftnum,finput);
aes.Cipher(inBuff,ouBuff);
fwrite(ouBuff,1,16,foutput);
}
fclose(finput);
fclose(foutput);
MessageBox("加密成功!");
SetDlgItemText(IDC_EFile,EnDe_filename);
m_prog.SetPos(0);
}
////////////////////////////////////////////////////////////////////////////////////////////////
//Aes文件解密
void CAesCodeDlg::OnBFileDe()
{
// TODO: Add your control notification handler code here
if(EnDe_filename=="")return;
FILE* finput;
FILE* foutput;
finput=fopen((LPCTSTR)EnDe_filename,"rb");
if(!finput)
{
MessageBox("文件打开错误","出错",MB_OK);
return;
}
fseek(finput,0,SEEK_END);
long lFileLen=ftell(finput); //ftell()函数返回文件位置指示符的当前值,即如果现在是在文件结尾,则这个值就是文件长度
fseek(finput,0,SEEK_SET);
long blocknum=lFileLen/16;
long leftnum=lFileLen%16;
EnDe_filename+=".de";
foutput=fopen((LPCTSTR)EnDe_filename,"wb");
if(!foutput)
{
MessageBox("文件打开错误","出错",MB_OK);
fclose(finput);
return;
}
unsigned char inBuff[25],ouBuff[25];
Aes aes(16,(unsigned char*)"\x0\x1\x2\x3\x4\x5\x6\x7\x8\x9\xa\xb\xc\xd\xe\xf");
for(long i=0;i<blocknum;i++)
{
fread(inBuff,1,16,finput); //读取16个对象,每个对象的长度是1字节
aes.InvCipher(inBuff,ouBuff);
fwrite(ouBuff,1,16,foutput);
m_prog.SetPos(int(100*i/blocknum)); //加密进度条进度设置
}
if(leftnum)
{
MessageBox("文件可能已损坏或非经aes加密过");
}
fclose(finput);
fclose(foutput);
MessageBox("解密成功!");
SetDlgItemText(IDC_EFile,EnDe_filename);
m_prog.SetPos(0);
}
要源程序和全部代码给我邮箱我给你发过去。
D. vc加密卷适合win7系统文件数据加密吗
给win7系统文件加密可以试一下超级加密3000
超级加密3000具有文件加密、文件夹加密、数据粉碎、彻底隐藏硬盘分区、禁止或只读使用USB存储设备等功能。加密速度块!并且还有防复制防移动防删除的功能。每次使用加密文件夹或加密文件后不用再重新加密。而且使用也非常方便,安装软件后直接对需要加密的文件夹右击,选择加密就可以了。
E. 有可以加密vc vs的源代码加密软件吗防员工泄密用的。
有企业用的源代码加密软件,这类软件稳定性要求非常高,所以使用的时候建议先测试再购买
F. vc如何对文件夹进行加密,只有我的程序能够打开
有种方法,可以试试:
先保存文件夹的文件链表信息(类似于一颗树),然后把所有的文件的内容加密后累计在一个文件中。解密的时候先读出文件链表信息,然后把文件内容解密后生成在各自的文件中。
这种方法对大文件夹来说虽然效率比较低,但是非常有效的。可以把加密后的文件夹进行任意拷贝移动,跟操作系统没有多大的关系,也就是重新安装了操作系统、格式化了系统盘,也可以正常使用。
许多文件夹加密的方法是只是对文件夹的属性进行处理了,一旦重新安装系统或拷贝在其他电脑上就不行了。
G. 如何用vc编写一个加密软件
这个我不会。
加密软件我使用的是文件夹加密超级大师。
文件夹加密超级大师支持所有windows系统,可以加密文件夹,加密文件,保护磁盘和数据粉碎,使用起来非常方便。
H. 如何给vc程序加密
不懂加密直接加壳吧,bbs.pediy.com这上面资料很多
建议加强壳TMD,NoobyProtect,Zprotect等
关键代码用VMProtect或NoobyProtect加密
以上软件均有破解版