本文目录一览

1,关于C的加密与解密

其实加密与解密就是在数据中加一个算法,比较用的多就是MD5之类的,其实你自己也可以写一个简单的,例如数字加密,算法可以是乘以5加1,解密就是减1后除以5.真正的加解密算法是很复杂的,不可能简单的就告诉你,有兴趣自己去查比较好。
用MD5加密函数去加密

关于C的加密与解密

2,rsa算法是基于什么数学难题构造的

基于这样的事实:生成大素数是容易的,但是给定一个大数(两个素数的乘积),找出它的因子(素数分解)是困难的。https://en.wikipedia.org/wiki/RSA_(cryptosystem)
非对称密码体制的特点:算法强度复杂、安全性依赖于算法与密钥但是由于其算法复杂... 使用最广泛的是rsa算法,elgamal是另一种常用的非对称加密算法。
rsa基于大素数的分解因子难题

rsa算法是基于什么数学难题构造的

3,怎么配置SSH

这个有版本要求的 IOS 12.0以上且K9 的才可以1定义用户 user mize pass nnwh@163.net 2 定义域名 ip domain-name mize.myrice.com //配置SSH必需 3生成密钥 crypto key generate rsa modulus 2048 执行结果: The name for the keys will be: 6509-mize.myrice.com % The key modulus size is 2048 bits Generating RSA keys ... [OK] 4设置ssh超时时间 ip ssh time 120 5设置一个认证强度 ip ssh authentication ? Number of authentication retries
主要是 /etc/hosts.allow 和 /etc/hosts.deny问题 最好两个都设置一下。 因为有些系统是先load hosts.allow 再 load hosts.allow .有些相反。 hosts.allow: ALL:ALL:allow sshd sshd1 sshd2:ALL:allow #ssh:0.0.0.0/0.0.0.0 sshd:192.168.1.:allow hosts.deny sshd[2760]: # you should know that NFS uses portmap! ALL:ALL EXCEPT 127.0.0.1:DENY to ALL:ALL EXCEPT 127.0.0.1 AND 192.168.1.111:DENY 完成后。重启sshd : service sshd restart /etc/init.d/sshd restart 如果还不行就查一下syslog 位置在 /var/log/syslog 在那可以看到为什么不行。再改一下。再测试一下。反正都要多试几种方法 .... ....refused connect from ::ffff:192.168.*.*... 方法二 修改/etc/hosts.allow文件,加入 sshd:ALL。
switch#conf ter switch(config)#hostname SW1 switch(config)#enable password cisco switch(config)#enable secret cisco switch(config)#ip domain-name cisco.com switch(config)#username cisco password ciscoswitch(config)#line vty 0 4 switch(config-line)#password cisco switch(config-line)#transport input ssh switch(config-line)#login switch(config-line)#exit switch(config)#crypto key generate rsa R1#ssh -l cisco 192.168.1.2 Open Password:cisco SW1>en Password:cisco SW1# ...

怎么配置SSH

4,Java加密是怎么个思想请具体一点新手

找到一個實例, 參考看看import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.Security; import javax.crypto.BadPaddingException; import javax.crypto.Cipher; import javax.crypto.IllegalBlockSizeException; import javax.crypto.KeyGenerator; import javax.crypto.NoSuchPaddingException; import javax.crypto.SecretKey; public class EncrypDES //KeyGenerator 提供对称密钥生成器的功能,支持各种算法 private KeyGenerator keygen; //SecretKey 负责保存对称密钥 private SecretKey deskey; //Cipher负责完成加密或解密工作 private Cipher c; //该字节数组负责保存加密的结果 private byte[] cipherByte; public EncrypDES() throws NoSuchAlgorithmException, NoSuchPaddingException Security.addProvider(new com.sun.crypto.provider.SunJCE()); //实例化支持DES算法的密钥生成器(算法名称命名需按规定,否则抛出异常) keygen = KeyGenerator.getInstance("DES"); //生成密钥 deskey = keygen.generateKey(); //生成Cipher对象,指定其支持的DES算法 c = Cipher.getInstance("DES"); } /** * 对字符串加密 * * @param str * @return * @throws InvalidKeyException * @throws IllegalBlockSizeException * @throws BadPaddingException */ public byte[] Encrytor(String str) throws InvalidKeyException, IllegalBlockSizeException, BadPaddingException // 根据密钥,对Cipher对象进行初始化,ENCRYPT_MODE表示加密模式 c.init(Cipher.ENCRYPT_MODE, deskey); byte[] src = str.getBytes(); // 加密,结果保存进cipherByte cipherByte = c.doFinal(src); return cipherByte; } /** * 对字符串解密 * * @param buff * @return * @throws InvalidKeyException * @throws IllegalBlockSizeException * @throws BadPaddingException */ public byte[] Decryptor(byte[] buff) throws InvalidKeyException, IllegalBlockSizeException, BadPaddingException // 根据密钥,对Cipher对象进行初始化,DECRYPT_MODE表示加密模式 c.init(Cipher.DECRYPT_MODE, deskey); cipherByte = c.doFinal(buff); return cipherByte; } /** * @param args * @throws NoSuchPaddingException * @throws NoSuchAlgorithmException * @throws BadPaddingException * @throws IllegalBlockSizeException * @throws InvalidKeyException */ public static void main(String[] args) throws Exception EncrypDES de1 = new EncrypDES(); String msg ="郭XX-搞笑相声全集"; byte[] encontent = de1.Encrytor(msg); byte[] decontent = de1.Decryptor(encontent); System.out.println("明文是:" + msg); System.out.println("加密后:" + new String(encontent)); System.out.println("解密后:" + new String(decontent)); } }

5,Vista更新程序Windows Update80070002错误的处理办

必须以管理员身份进行登录,才能执行这些步骤。 右击桌面上“计算机”图标,打开“管理工具”。 双击“服务”。 如果系统提示您输入管理员密码或进行确认,请键入密码或提供确认。 右键单击 Windows Update 服务,然后单击“停止”。 双击安装 Windows 的本地硬盘,通常为驱动器 C。 双击 Windows 文件夹,然后双击 SoftwareDistribution 文件夹。 双击 DataStore 文件夹将其打开,然后删除该文件夹中的所有文件和文件夹。 如果系统提示您输入管理员密码或进行确认,请键入密码或提供确认。 单击“后退”按钮。在 SoftwareDistribution 文件夹中,双击 Download 文件夹将其打开,然后删除该文件夹中的所有文件。 如果系统提示您输入管理员密码或进行确认,请键入密码或提供确认。 右击桌面上“计算机”图标,打开“管理工具”。 双击“服务”。 如果系统提示您输入管理员密码或进行确认,请键入密码或提供确认。 右键单击 Windows Update 服务,然后单击“开始”。
Auto Update 服务正常吗? 如果貌似一切正常,那么按照下面的步骤: 1. 关闭 Auto updates 服务,可别禁用,下面的一个服务同理。 2. 关闭 Crypto 服务, 在 XP 和 Vista 上它的名字 不太一样。 3. 将 C:\windows\system32\catroot2 改名。 4. 重启再试试 update。 注意:是 catroot2, 千万别改 catroot 因为曾经回答过所以,请参考我的这条回答 http://wenwen.soso.com/z/q151913564.htm
如果您的计算机从未运行 Microsoft Internet Explorer,并在任何程序中使用 WinHttpGetIEProxyConfigForCurrentUser 函数,则您将收到以下错误信息: ERROR_FILE_NOT_FOUND 回到顶端 原因 此 WinHttpGetIEProxyConfigForCurrentUser 函数将使用以下注册表子项: HKEY_CURRENT_USER\Software... 此 WinHttpGetIEProxyConfigForCurrentUser 函数将使用以下注册表子项: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings此注册表子项,第一次,会创建 Internet Explorer 运行。 如果您的计算机没有运行 Internet Explorer,则此注册表子项不存在。 当您调用 WinHttpGetIEProxyConfigForCurrentUser 函数程序,该函数搜索此注册表项中找不到,并收到错误消息。 回到顶端 解决方案 要解决此问题,启动 Internet Explorer,然后使用在任何程序中的 WinHttpGetIEProxyConfigForCurrentUser 函数... 要解决此问题,启动 Internet Explorer,然后使用在任何程序中的 WinHttpGetIEProxyConfigForCurrentUser 函数。 回到顶端 更多信息 重现此问题的步骤 登录到的 Internet Explorer 已永远不会使用在计算机上。 启动 Microsoft Visual Studio.NET。 在... 重现此问题的步骤 登录到的 Internet Explorer 已永远不会使用在计算机上。 启动 Microsoft Visual Studio.NET。 在 文件 菜单上指向 新建 ,然后单击 项目 。 在 项目类型 ,下单击 Visual C++ 项目 。 在 模板 ,下单击 Win 32 项目 。 在 名称 框中键入 测试 ,然后单击 确定 。 在 欢迎使用 Win 32 应用程序向导 页中上, 单击 应用程序设置 。 应用程序类型 ,下单击 控制台应用程序 ,然后单击 完成 。 创建 test.cpp 文件。 Replace the existing code in the Test.cpp file with the following code: #include "stdafx.h" #include <Windows.h> #include <Winhttp.h> using namespace std; void main() 在 项目 菜单中上, 单击 测试属性 。 在左窗格中中, 双击 链接器 。 在 链接器 ,单击 输入 。 在右的窗格中在 附加依赖项 字段中键入 winhttp.lib ,然后单击 确定 。 在 生成 菜单上单击 生成解决方案 。 按 Ctrl+F 5 运行该程序不在调试程序。 您收到"症状"一节中提到错误消息。 参考 有关详细信息,请访问下面的 Microsoft Developer Network (MSDN) 网站: http://msdn2.microsoft.com/... 有关详细信息,请访问下面的 Microsoft Developer Network (MSDN) 网站: http://msdn2.microsoft.com/en-us/library/aa384096.aspx
关闭自动更新,用360打补丁.

文章TAG:encrypto关于  加密  解密  
下一篇