使用C++编译,有界面,功能强大完整。
如下式加密算法部分:
void CRSAUtilDlg::OnButtonDecrypt()
{
UpdateData();
CBigNumber cipher;
cipher.StringHexFrom(m_strMessageC);
BYTE by[8192];
m_pbDE.SetRange(0, 100);
DWORD dwTicks = GetTickCount();
for (int i = 0; i < m_nEncryptionDecryptionTestTimes; i++)
{
memset(by, 0, sizeof(by));
//int n = m_rsa.rsaTestPublicD(by, sizeof(by), &cipher);
int n = m_rsa.rsaPublicDecrypt(by, sizeof(by), &cipher);
m_pbDE.SetPos(i * 100 / m_nEncryptionDecryptionTestTimes);
}
dwTicks = GetTickCount() - dwTicks + 1;
m_pbDE.SetPos(0);
m_strMessageC = by;
m_strMessage.Format(
"Decryption %d times, used %d.%d seconds, DPS = %d",
m_nEncryptionDecryptionTestTimes,
dwTicks / 1000, dwTicks % 1000,
m_nEncryptionDecryptionTestTimes * 1000 / dwTicks);
UpdateData(false);
}
2022-06-01 13:07:38
136KB
rsa
1