zoukankan      html  css  js  c++  java
  • 通过密钥对字符串进行加解密(C#)

      视频上看到的例子,对着视频打了一遍代码,测试失败,上网搜索后改了一下测试成功,不知道为什么跟视频上打的一样的代码视频上测试的正确而我的测试出错的,先不管了,先记下来,以备后用!

    Code

    测试代码:

            static void Main(string[] args)
            {
                Console.Write(
    "请输入要加密的字符串:");
                
    string str = Console.ReadLine();
                Console.WriteLine(
    "加密后:" + new Encrypt().EncryptString(str));
                Console.ReadLine();

                Console.Write(
    "请输入要解密的字符串:");
                
    string str2 = Console.ReadLine();
                Console.WriteLine(
    "解密后:" + new Encrypt().DecryptString(str2));
                Console.ReadLine();
            }

     测试效果:

     

    撸码:复制、粘贴,拿起键盘就是“干”!!!
  • 相关阅读:
    pipeline+sonar
    ThinkPHP 3.2.3 使用 PHPExcel 处理 Excel 表格
    mac下finder子目录直接打开终端
    golang之交叉编译设置
    cocos2dx 3.0 编译工程
    2dx 3.0环境配置(mac)
    golang调用动态库
    qt下用启动图
    qt在动态库里面加载widget的例子
    qt笔记
  • 原文地址:https://www.cnblogs.com/niunan/p/1518001.html
Copyright © 2011-2022 走看看