欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

vb.net密碼加密 vb加密文件

加密解密高手進!VB.NET 誰能給一個MD5或其他的加密算法

這個是我之前寫的。在需要時調(diào)用即可。

創(chuàng)新互聯(lián)公司網(wǎng)站設(shè)計,為客戶量身定制各類網(wǎng)站建設(shè)業(yè)務(wù),包括企業(yè)型、電子商務(wù)型、響應(yīng)式網(wǎng)站、行業(yè)門戶型等各類網(wǎng)站,實戰(zhàn)經(jīng)驗豐富,成功案例眾多。以客戶利益為出發(fā)點,創(chuàng)新互聯(lián)公司網(wǎng)站制作為客戶規(guī)劃、按需網(wǎng)站制作符合企業(yè)需求、帶有營銷價值的網(wǎng)絡(luò)建站方案認(rèn)真對待每一個客戶,我們不用口頭的語言來吹擂我們的優(yōu)秀,千余家的成功案例見證著我們的成長。

Public Shared Function Encrypt(ByVal Text As String, ByVal sKey As String) As String

Dim provider As New DESCryptoServiceProvider()

Dim bytes As Byte() = Encoding.[Default].GetBytes(Text)

provider.Key = Encoding.ASCII.GetBytes(FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(0, 8))

provider.IV = Encoding.ASCII.GetBytes(FormsAuthentication.HashPasswordForStoringInConfigFile(sKey, "md5").Substring(0, 8))

Dim stream As New MemoryStream()

Dim stream2 As New CryptoStream(stream, provider.CreateEncryptor(), CryptoStreamMode.Write)

stream2.Write(bytes, 0, bytes.Length)

stream2.FlushFinalBlock()

Dim builder As New StringBuilder()

For Each num As Byte In stream.ToArray()

builder.AppendFormat("{0:X2}", num)

Next

Return builder.ToString()

End Function

希望能幫到你

VB.NET程序加密問題

在FormLoad事件里,寫如下代碼:

If MsgBox("是否打開程序?", MsgBoxStyle.OkCancel) = MsgBoxResult.Cancel Then

End

End If

大概方法是這樣,要想加密碼的話,將MsgBox()換成你自己寫的對話框。

如果還嫌不夠具體的話,你這點兒分就不夠。。。

用VB.net編寫一個加密解密軟件

"采用DES算法"這個說法不明確,首先是使用多少位的DES進行加密,通常是128位或192位,其次是,要先把主密鑰轉(zhuǎn)化成散列,才能供DES進行加密,轉(zhuǎn)化的方法是什么沒有明確,通常是md5,所以有的銀行卡說是128位md5 3DS就是指用md5轉(zhuǎn)換主密鑰散列,用DES進行加密,但是DES本身是64位(包含校驗碼),2DES是128位,3DES是192位,但是沒有2DES的叫法,所以128位、192位統(tǒng)稱3DES

要完整的md5+3DS實例,需要100分以上,要不到我的空間中查找相關(guān)的文章

VB.NET開發(fā)的軟件,大家一般都是怎么加密的

網(wǎng)上有很多專業(yè)的加密教程

最適合小開發(fā)者的軟件加密方式就是下面這個

獲取硬件信息和個人注冊時的姓名手機號等一系列信息,通過預(yù)先設(shè)定好的加密函數(shù)進行散列加密,生成一個只有本人本機能使用的序列號,軟件正版授權(quán)的時候用同樣的方式生成序列號進行比對,一樣則通過

vb.net中實現(xiàn)rsa加密解密 急!急!

我覺得你的并不是RSA加密解密算法。

在.net的有一個System.Security.Cryptography的命名空間,里面有一RSACryptoServiceProvider的類用來對byte進行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);

}

分享名稱:vb.net密碼加密 vb加密文件
標(biāo)題來源:http://chinadenli.net/article38/hgcdsp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供軟件開發(fā)、企業(yè)建站網(wǎng)頁設(shè)計公司、電子商務(wù)企業(yè)網(wǎng)站制作、用戶體驗

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

商城網(wǎng)站建設(shè)