首页 行业资讯 宠物日常 宠物养护 宠物健康 宠物故事

DES密码 密码学

发布网友

我来回答

1个回答

热心网友

156113150128160162115184200141157249149585353

C# 源码
using System;
using System.Collections.Generic;
using System.Text;
using System.Security.Cryptography;

namespace ConsoleApplication34
{
class Program
{
static void Main(string[] args)
{
DESCryptoServiceProvider des = new DESCryptoServiceProvider();
byte[] key = new byte[] { 0x13, 0x34, 0x57, 0x79, 0x9b, 0xbc, 0xde, 0xf1 };
byte[] clearText = new byte[] { 0x01, 0x23, 0x45, 0x67, 0x, 0xab, 0xcd, 0xef };
des.Key = key;
byte[] output = des.CreateEncryptor().TransformFinalBlock(clearText, 0, 8);
string fianlString = "";
for (int i = 0; i < output.Length; i++)
{
fianlString += output[i].ToString();
}
Console.Write(fianlString);
Console.Read();
}
}
}

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com