C 64位 加密 解密類

2022-06-14 04:24:11 字數 1484 閱讀 2078

///

///加密/解密類

/// public

class

encanddec

//////

解密的方法

/// ///

解密的資料

///返回加密前的字串

public

static

string decode(string

data)

//////

客戶本地加密的方法,通過2個密匙進行加密

/// ///

加密的資料

///返回加密後的字串

public

static

string encodeclientlocal(string

data)

//////

客戶本地解密的方法

/// ///

解密的資料

///返回加密前的字串

public

static

string decodeclientlocal(string

data)

#region dec加密的方法

//////加密的方法,通過2個密匙進行加密

/// ///

通過md5加密一次

//////

///private

string encode(string data, string key_64, string

iv_64)

//////

解密的方法()

/// ///

//////

///private

string decode(string data, string key_64, string

iv_64)

catch

descryptoserviceprovider cryptoprovider = new

descryptoserviceprovider();

memorystream ms = new

memorystream(byenc);

cryptostream cst = new

cryptostream(ms, cryptoprovider.createdecryptor(bykey, byiv), cryptostreammode.read);

streamreader sr = new

streamreader(cst);

return

sr.readtoend();

}#endregion

#region md5加密

//////轉換md5密碼

/// ///

///public

static

string tomd5(string

key)

#endregion

}

C 64位加密類

using system using system.data using system.configuration using system.web using system.web.security using system.web.ui using system.web.ui.webcontro...

C 64位遷移備忘

w64 int 這個型別有些奇怪,64位上大小顯示為8,但是作為指標型別,兩個變數進行算術運算時,得出的值並不正確。比如 w64 int p1 0x00000090 w64 int p2 0x000000a0 long p1 p2 long的值為4 實際應該為16 8 2 還是我理解錯了?改用 pu...

C Base64加密,解密類

c base64加密,解密類 using system using system.collections.generic using system.linq using system.text using system.threading.tasks namespace wf 測試 base64加密...