Skip to content

Instantly share code, notes, and snippets.

@LinZap
Last active March 2, 2023 08:46
Show Gist options
  • Save LinZap/c7551251a0085a6b0e9c9f69e7826bca to your computer and use it in GitHub Desktop.
Save LinZap/c7551251a0085a6b0e9c9f69e7826bca to your computer and use it in GitHub Desktop.
Crypto 支援可指定自訂義編碼

Crypto 支援可指定自訂義編碼

版本: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); // 你好我是大衛

回 ZapLib v2.4.3 changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment