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.

Revisions

  1. LinZap revised this gist Mar 2, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@
    **使用範例**

    ```csharp
    Crypto c = new Crypto(Encoding.UTF8);
    Crypto c = new Crypto(Encoding.UTF8); // 指定 UTF8 編碼
    string exp = "你好我是大衛";
    string s = c.DESEncryption(exp);
  2. LinZap revised this gist Mar 2, 2023. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -8,9 +8,11 @@

    ```csharp
    Crypto c = new Crypto(Encoding.UTF8);

    string exp = "你好我是大衛";
    string s = c.DESEncryption(exp);
    Trace.WriteLine(s); // C3589098F93588AA91596AE9F63625655B168C73F59E43C8
    string ds = c.DESDecryption(s,c.IV);
    Trace.WriteLine(ds); // 你好我是大衛
    ```
  3. LinZap created this gist Mar 2, 2023.
    18 changes: 18 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    # Crypto 支援可指定自訂義編碼

    > 版本:ZapLib v2.4.3
    `Crypto` 支援可指定自訂義編碼 (原本只能 `Encoding.ASCII`)

    **使用範例**

    ```csharp
    Crypto c = new Crypto(Encoding.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](https://github.com/LinZap/ZapLib/blob/master/CHANGELOG.md#243)