網(wǎng)上有很多專業(yè)的加密教程
創(chuàng)新互聯(lián)建站,是成都地區(qū)的互聯(lián)網(wǎng)解決方案提供商,用心服務(wù)為企業(yè)提供網(wǎng)站建設(shè)、成都app軟件開發(fā)、成都小程序開發(fā)、系統(tǒng)定制網(wǎng)站設(shè)計和微信代運(yùn)營服務(wù)。經(jīng)過數(shù)十多年的沉淀與積累,沉淀的是技術(shù)和服務(wù),讓客戶少走彎路,踏實(shí)做事,誠實(shí)做人,用情服務(wù),致力做一個負(fù)責(zé)任、受尊敬的企業(yè)。對客戶負(fù)責(zé),就是對自己負(fù)責(zé),對企業(yè)負(fù)責(zé)。
最適合小開發(fā)者的軟件加密方式就是下面這個
獲取硬件信息和個人注冊時的姓名手機(jī)號等一系列信息,通過預(yù)先設(shè)定好的加密函數(shù)進(jìn)行散列加密,生成一個只有本人本機(jī)能使用的序列號,軟件正版授權(quán)的時候用同樣的方式生成序列號進(jìn)行比對,一樣則通過
.net不知道怎么弄,vb倒是有文章
asp編譯成dll-圖形化教程
生成的dll文件肯定要到注冊到服務(wù)器上才能用。
用法嘛,和asp內(nèi)置幾大象的用法類似(就是面向?qū)ο螅?,你在dll中寫一個類,類中定一個加密和解密的方法,在asp里面實(shí)例化(new)這個類,用來加解密就可以了。
在FormLoad事件里,寫如下代碼:
If MsgBox("是否打開程序?", MsgBoxStyle.OkCancel) = MsgBoxResult.Cancel Then
End
End If
大概方法是這樣,要想加密碼的話,將MsgBox()換成你自己寫的對話框。
如果還嫌不夠具體的話,你這點(diǎn)兒分就不夠。。。
我覺得你的并不是RSA加密解密算法。
在.net的有一個System.Security.Cryptography的命名空間,里面有一RSACryptoServiceProvider的類用來對byte進(jìn)行RSA加密解密。
具體例子如下:
using System;
using System.Security.Cryptography;
using System.Text;
class RSACSPSample
{
static void Main()
{
try
{
//Create a UnicodeEncoder to convert between byte array and string.
UnicodeEncoding ByteConverter = new UnicodeEncoding();
//Create byte arrays to hold original, encrypted, and decrypted data.
byte[] dataToEncrypt = ByteConverter.GetBytes("Data to Encrypt");
byte[] encryptedData;
byte[] decryptedData;
//Create a new instance of RSACryptoServiceProvider to generate
//public and private key data.
RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();
//Pass the data to ENCRYPT, the public key information
//(using RSACryptoServiceProvider.ExportParameters(false),
//and a boolean flag specifying no OAEP padding.
encryptedData = RSAEncrypt(dataToEncrypt,RSA.ExportParameters(false), false);
//Pass the data to DECRYPT, the private key information
//(using RSACryptoServiceProvider.ExportParameters(true),
//and a boolean flag specifying no OAEP padding.
decryptedData = RSADecrypt(encryptedData,RSA.ExportParameters(true), false);
//Display the decrypted plaintext to the console.
Console.WriteLine("Decrypted plaintext: {0}", ByteConverter.GetString(decryptedData));
}
catch(ArgumentNullException)
{
//Catch this exception in case the encryption did
//not succeed.
Console.WriteLine("Encryption failed.");
}
}
static public byte[] RSAEncrypt(byte[] DataToEncrypt, RSAParameters RSAKeyInfo, bool DoOAEPPadding)
{
try
{
//Create a new instance of RSACryptoServiceProvider.
RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();
//Import the RSA Key information. This only needs
//toinclude the public key information.
RSA.ImportParameters(RSAKeyInfo);
//Encrypt the passed byte array and specify OAEP padding.
//OAEP padding is only available on Microsoft Windows XP or
//later.
return RSA.Encrypt(DataToEncrypt, DoOAEPPadding);
}
//Catch and display a CryptographicException
//to the console.
catch(CryptographicException e)
{
Console.WriteLine(e.Message);
return null;
}
}
static public byte[] RSADecrypt(byte[] DataToDecrypt, RSAParameters RSAKeyInfo,bool DoOAEPPadding)
{
try
{
//Create a new instance of RSACryptoServiceProvider.
RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();
//Import the RSA Key information. This needs
//to include the private key information.
RSA.ImportParameters(RSAKeyInfo);
//Decrypt the passed byte array and specify OAEP padding.
//OAEP padding is only available on Microsoft Windows XP or
//later.
return RSA.Decrypt(DataToDecrypt, DoOAEPPadding);
}
//Catch and display a CryptographicException
//to the console.
catch(CryptographicException e)
{
Console.WriteLine(e.ToString());
return null;
}
}
}
[Visual Basic]
Try
'Create a new RSACryptoServiceProvider object.
Dim RSA As New RSACryptoServiceProvider()
'Export the key information to an RSAParameters object.
'Pass false to export the public key information or pass
'true to export public and private key information.
Dim RSAParams As RSAParameters = RSA.ExportParameters(False)
Catch e As CryptographicException
'Catch this exception in case the encryption did
'not succeed.
Console.WriteLine(e.Message)
End Try
[C#]
try
{
//Create a new RSACryptoServiceProvider object.
RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();
//Export the key information to an RSAParameters object.
//Pass false to export the public key information or pass
//true to export public and private key information.
RSAParameters RSAParams = RSA.ExportParameters(false);
}
catch(CryptographicException e)
{
//Catch this exception in case the encryption did
//not succeed.
Console.WriteLine(e.Message);
}
最好的加密就是通過你的網(wǎng)站去加密!用網(wǎng)絡(luò)服務(wù)器驗(yàn)證把一些主要程序都可以加載到服務(wù)器上!這樣你的程序加密就完美了! (個人觀點(diǎn)純屬不懂裝懂的。哈哈見笑)
"采用DES算法"這個說法不明確,首先是使用多少位的DES進(jìn)行加密,通常是128位或192位,其次是,要先把主密鑰轉(zhuǎn)化成散列,才能供DES進(jìn)行加密,轉(zhuǎn)化的方法是什么沒有明確,通常是md5,所以有的銀行卡說是128位md5 3DS就是指用md5轉(zhuǎn)換主密鑰散列,用DES進(jìn)行加密,但是DES本身是64位(包含校驗(yàn)碼),2DES是128位,3DES是192位,但是沒有2DES的叫法,所以128位、192位統(tǒng)稱3DES
要完整的md5+3DS實(shí)例,需要100分以上,要不到我的空間中查找相關(guān)的文章
網(wǎng)頁標(biāo)題:vb.net應(yīng)用如何加密 vb軟件加密
鏈接地址:http://jinyejixie.com/article10/dosdpgo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制網(wǎng)站、自適應(yīng)網(wǎng)站、網(wǎng)站制作、App設(shè)計、品牌網(wǎng)站建設(shè)、微信公眾號
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)