1、编写文件加密程序(能够选择文件、输入密码)的代码和步骤 2、编写MD5程序(有函数、测试代码)步骤

1、编写文件加密程序(能够选择文件、输入密码)的代码和步骤 2、编写MD5程序(有函数、测试代码)步骤,第1张

using System;

using SystemCollectionsGeneric;

using SystemIO;

using SystemLinq;

using SystemText;

namespace baidu

{

class temp

{

public static void main()

{

//string s = "cn9sky888";

FileStream fs = new FileStream("Passwordtxt", FileMode Open );

StreamReader sr = new StreamReader(fs);

if (FileExists("PasswordMd5txt"))

{

FileDelete("PasswordMd5txt");

}

FileStream fs2 = new FileStream("PasswordMd5txt",FileMode OpenOrCreate );

StreamWriter sw = new StreamWriter(fs2);

string temp = "";

int count = 0;

while(!srEndOfStream )

{

temp = srReadLine();

swWriteLine(temp + "\t" + tempMd5Bit16() + "\t" + tempMd5Bit32());

count++ Show ();

}

}

}

public static class MyExtensions

{

public static string CharToString(this char[] temp)

{

string s = "";

for (int i = 0; i < tempLength; i++)

{

s += temp[i]ToString();

}

return s;

}

#region//string

public static string sort(this string temp)

{

return tempToint()sort()Tochararray()CharToString();

}

public static int[] ToIntArray(this string temp, string spliter)

{

string[] temp2 = tempSplit(spliterToCharArray());

List<int> ls = new List<int>();

for (int i = 0; i < temp2Length; i++)

{

lsAdd(temp2[i]ToInt());

}

return lsToArray();

}

public static int ToInt(this string temp)

{

return intParse(temp);

}

public static int[] Toint(this string temp)

{

List<int> ls = new List<int>();

for (int i = 0; i < tempLength; i++)

{

lsAdd((int)temp[i]);

}

return lsToArray();

}

public static byte ToTinyInt(this string temp)

{

return ConvertToByte(temp);

}

public static int CountNum(this string temp)

{

int sum = 0;

for (int i = 0; i < tempLength; i++)

{

if ((int)temp[i] >= 48 && (int)temp[i] <= 57)

{

sum++;

}

}

return sum;

}

public static int CountLetter(this string temp)

{

int sum = 0;

temp = tempToUpper();

for (int i = 0; i < tempLength; i++)

{

if ((int)temp[i] >= 65 && (int)temp[i] <= 90)

{

sum++;

}

}

return sum;

}

public static int CountOther(this string temp)

{

return tempLength - tempCountLetter() - tempCountNum();

}

public static string Md5Bit32(this string temp)

{

string strResult = "";

string strHashData = "";

byte[] arrbytHashValue;

SystemSecurityCryptographyMD5CryptoServiceProvider oMD5Hasher = new SystemSecurityCryptographyMD5CryptoServiceProvider();

try

{

arrbytHashValue = oMD5HasherComputeHash(SystemTextEncodingDefaultGetBytes(temp));

//oMD5Hasher ComputeHash (

//由以连字符分隔的十六进制对构成的String,其中每一对表示value 中对应的元素;例如“F-2C-4A”

strHashData = SystemBitConverterToString(arrbytHashValue);

//替换-

strHashData = strHashDataReplace("-", "");

strResult = strHashData;

}

catch (SystemException ex)

{

ConsoleWriteLine(exMessage);

}

return strResult;

}

public static string Md5Bit16(this string temp)

{

return tempMd5Bit32()Substring(8, 16);

}

#endregion

#region//int

public static int[] sort(this int[] temp)

{

List<int> ls;

ls = tempToList();

lsSort();

return lsToArray();

}

public static char[] Tochararray(this int[] temp)

{

List<char> ls = new List<char>();

for (int i = 0; i < tempLength; i++)

{

lsAdd((char)temp[i]);

}

return lsToArray();

}

public static int[] Remove(this int[] temp, int tmp)

{

List<int> ls = new List<int>();

ls = tempToList();

lsRemove(tmp);

return lsToArray();

}

public static int[] RemoveAt(this int[] temp, int index)

{

List<int> ls = new List<int>();

ls = tempToList();

lsRemoveAt(index);

return lsToArray();

}

public static int find(this int[] temp, int tmp)

{

return tempToList()IndexOf(tmp);

}

public static int[] insert(this int[] temp, int index, int tmp)

{

temp = tempRemoveAt(index);

List<int> ls = new List<int>();

ls = tempToList();

lsInsert(index, tmp);

return lsToArray();

}

#endregion

#region//init()

public static int[,] init(this int[,] temp)

{

Random rm = new Random();

int rank = tempRank;

int line = tempGetLength(0);

int row = tempLength / line;

for (int j = 0; j < line; j++)

{

for (int i = 0; i < row; i++)

{

temp[j, i] = rmNext(9);

}

}

return temp;

}

public static string init(this string s, int lenght)

{

string temp = "";

Random rm = new Random();

for (int i = 0; i < lenght; i++)

{

temp += ((char)rmNext(65, 90))ToString();

}

return temp;

}

public static int[] init(this int[] temp, int min, int max)

{

Random rm = new Random();

for (int i = 0; i < tempLength; i++)

{

Rand:

int rm2 = rmNext(min, max);

if (!tempToList()Contains(rm2))

temp[i] = rm2;

else

goto Rand;

//temp[i] = rmNext(min,max);

}

return temp;

}

public static bool IsEven(int temp)

{

if (temp % 2 == 0 && temp != 0)

return true;

else

return false;

}

public static bool IsUneven(int temp)

{

if (temp % 2 != 0 && temp != 0)

return true;

else

return false;

}

public static bool Is0(int temp)

{

if (temp == 0)

return true;

else

return false;

}

public static int[] ReturnEven(this int[] temp)

{

return tempToList()FindAll(IsEven)ToArray()sort();

}

public static int[] ReturnUneven(this int[] temp)

{

return tempToList()FindAll(IsUneven)ToArray()sort();

}

public static int[] Return0(this int[] temp)

{

return tempToList()FindAll(Is0)ToArray()sort();

}

#endregion

#region//show

public static void Show(this byte temp)

{

ConsoleWriteLine(temp);

wline();

}

public static void Show(this string temp)

{

ConsoleWriteLine(temp);

wline();

}

public static void Show(this int temp)

{

ConsoleWriteLine(temp);

wline();

}

public static void Show(this int[,] temp)

{

int rank = tempRank;

int line = tempGetLength(0);

int row = tempLength / line;

for (int j = 0; j < line; j++)

{

for (int i = 0; i < row; i++)

{

ConsoleWrite(temp[j, i] + " ");

}

ConsoleWriteLine();

}

wline();

}

public static int[] Show(this int[] temp)

{

for (int i = 0; i < tempLength; i++)

{

ConsoleWrite(temp[i] + " ");

}

ConsoleWriteLine();

wline();

return temp;

}

#endregion

public static void wline()

{

ConsoleWriteLine("-------------------------------------------------------------------");

}

}

}

这个我不会。

给电脑上的文件加密或者文件夹加密,你可以使用超级加密3000。

超级加密3000采用国际上成熟的加密算法和安全快速的加密方法,可以有效保障数据安全!

具体 *** 作方法:

1下载安装超级加密3000。

2 然后在需要加密的文件上单击鼠标右键选择加密。

3 在d出的文件加密窗口中设置文件加密密码就OK了。

超级加密3000的下载地址你可以在百度上搜索超级加密3000,第一个就是。

自己编写一个文件夹加密软件,也太麻烦了。

文件夹加密软件,我使用的是文件夹加密超级大师。

文件夹加密超级大师支持所有windows系统,可以加密文件夹,加密文件,保护磁盘和数据粉碎,使用起来非常方便。

在需要加密的文件和文件夹上单击鼠标右键选择加密就可以了。

解密时只要双击加密的文件夹和文件,输入正确的密码就可以解密。

文件夹加密超级大师加密后的文件和文件夹可以防止删除、复制和移动。

相对于其他的文件夹加密软件和文件加密软件,功能和性能还有 *** 作都更加的出色。

并且有微软、360和金山的安全认证,是一款绝对安全的文件夹加密软件。

您可以到百度上下载文件夹加密超级大师来给您的文件和文件夹加密,看看使用效果怎么样?

公司电脑文件数据透明加密防泄密软件系统——德人合科技 提供软件系统及技术支持

“文件加密系统”是指采用计算机、网络通讯、密码加密技术对各类需要加密的文件(红头文件、机要文件、会议纪要、图纸、技术资料、财务报表、商业数据等)进行加密防止非法泄密的计算机加密控制软件。

一、文档安全系统适合企业、政府、军队、金融、通讯、保险、司法、个人等有各种数据保密需要的单位和个人使用。

二、文档安全系统的使用不会影响 *** 作者原有 *** 作习惯,保密环境建立简单、管理方便。是企业文件加密、数据保密理想的解决方案。

三、文件加密系统的版本有单机版和网络版两套系统。网络版文档安全系统

基于企业局域网环境进行工作,客户端用户负责对电子文件进行加密,服务端用户负责对客户端用户的管理、客户端用户 *** 作的跟踪、加密文件的解密等。

四、文档安全系统支持Windows、macOS、Linux等主流 *** 作系统,可以对用户指定的任意文件格式(PPTdwg;txt;doc;prtpdf ----------)文件进行加密。

加密指定程序生成的文档

强制加密指定程序编辑的文档。用户访问加密文档时,需要连接服务器(在线,非脱机状态),并且具有合适的访问权限。该加密过程完全透明,不影响现有应用和用户习惯。通过共享、离线和外发管理可以实行更多的访问控制。

泄密控制

对打开加密文档的应用程序进行如下控制:打印、内存窃取、拖拽和剪贴板等,用户不能主动或被动地泄漏机密数据。

审批管理

支持共享、离线和外发文档,管理员可以按照实际工作需求,配置是否对这些 *** 作进行强制审批。用户在执行加密文档的共享、离线和外发等 *** 作时,将视管理员的权限许可,可能需要经过审批管理员审批。

离线文档管理

客户端需要连接服务器才能访问加密文档。通过本功能制作离线文档,即使客户端未连接服务器,用户也可以阅读这些离线的文档。根据管理员权限许可,离线文档可能需要经过审批管理员审批离线时,可以控制客户端的离线时间和离线时是否允许打印。

外发文档管理

外部人员不能阅读加密文档的内容。本功能制作外发文档,即使在未安装客户端的机器上,也可以阅读这些外发的文档。根据管理员权限许可,外发文档可能需要经过审批管理员审批外发的文档,和内部使用一样,受到加密保护和泄密控制,不会造成文档泄露,同时增加口令和机器码验证,增强外发文档的安全性。

用户/鉴权

集成了统一的用户/鉴权管理,用户统一使用USB-KEY 进行身份认证,客户端支持双因子认证。

审计管理

对加密文档的常规 *** 作,进行详细且有效的审计。控制台提供了基于WEB的管理方式。审计管理员可以方便地通过浏览器进行系统的审计管理。

自我保护

通过在 *** 作系统的驱动层对系统自身进行自我保护,保障客户端不被非法破坏,并且始终运行在安全可信状态。即使客户端被意外破坏,客户端计算机里的加密文档也不会丢失或泄漏。

给文件加密,你可以在百度上下载超级加密3000 这是一款功能强大的文件和文件夹加密和保护软件。

超级加密3000有超快和最强的文件、文件夹加密功能、数据保护功能,文件夹、文件的粉碎删除以及文件夹伪装等功能。

超级加密 3000采用先进的加密算法,使你的文件和文件夹加密后,真正的达到超高的加密强度,让你的加密数据无懈可击。

超级加密3000还支持加密文件的临时解密,文件加密后,双击加密文件,在d出密码输入对话框输入正确的密码选择确定,该加密文件就处于临时解密,文件使用完毕退出以后,它自动恢复到加密状态,无需再加密。

超级加密3000是一款不可多得的文件加密软件,您可以到百度上搜索超级加密3000给您的文件加密试试看。

以上就是关于1、编写文件加密程序(能够选择文件、输入密码)的代码和步骤 2、编写MD5程序(有函数、测试代码)步骤全部的内容,包括:1、编写文件加密程序(能够选择文件、输入密码)的代码和步骤 2、编写MD5程序(有函数、测试代码)步骤、简单文件加密程序、如何用vb6.0编写文件夹加密程序等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/zz/10133111.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-05
下一篇 2023-05-05

发表评论

登录后才能评论

评论列表(0条)

保存