版本:ZapLib v2.4.3
Crypto
支援可指定自訂義編碼 (原本只能 Encoding.ASCII
)
使用範例
Crypto c = new Crypto(Encoding.UTF8); // 指定 UTF8 編碼
string exp = "你好我是大衛";
string s = c.DESEncryption(exp);
Trace.WriteLine(s); // C3589098F93588AA91596AE9F63625655B168C73F59E43C8
string ds = c.DESDecryption(s,c.IV);
Trace.WriteLine(ds); // 你好我是大衛