c语言程序设计文件加密解密
2022-06-14 09:06:14 97KB 文档资料
这个文件是我在测试中写的简单的文件加密软件,它一次最多可以加密300个文件,实际上就是将文件里面的0和1进行对换,由于0和1分别代表阴阳,因此将这个软件称作“逆乱阴阳文件加密”,其实原理很简单,可以自己写一个对这个软件进行解密的软件。
2022-06-06 16:01:06 16.84MB 文件加密 文件安全
1
使用该JAR包,能够给EXCEL直接加密,弹出对话框,输入正确密码,才能进入 方法: View m_view = new View(); m_view.read(inputExcelFile.getAbsolutePath()); m_view.editCopyRight(); m_view.write(outputExcel, pwd);
2022-06-06 15:29:00 3.28MB excel 加密 java
1
关于文件加密的软件制作,以及源码,对文件加密有心去的人可以进行下载
2022-06-06 10:50:14 6KB 加密 VB
1
文件加密解密算法(Java源码) java,file,算法,加密解密,java源码 package com.crypto.encrypt; import java.security.SecureRandom; import java.io.*; import javax.crypto.spec.DESKeySpec; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.Cipher; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException; import javax.crypto.NoSuchPaddingException; import javax.crypto.BadPaddingException; import javax.crypto.IllegalBlockSizeException; import java.lang.reflect.Constructor; import java.security.spec.KeySpec; import java.lang.reflect.InvocationTargetException; public class EncryptData { private String keyfile=null; public EncryptData() { } public EncryptData(String keyfile) { this.keyfile=keyfile; } /** * 加密文件 * @param filename String 源路径 * @param filenamekey String 加密后的路径 */ public void createEncryptData(String filename,String filenamekey) throws IllegalStateException, IllegalBlockSizeException, BadPaddingException, NoSuchPaddingException, InvalidKeySpecException, NoSuchAlgorithmException, InvalidKeyException, IOException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException, IllegalStateException, IllegalBlockSizeException, BadPaddingException, NoSuchPaddingException, InvalidKeySpecException, NoSuchAlgorithmException, InvalidKeyException, IOException { //验证keyfile if(keyfile==null || keyfile.equals("")) { throw new NullPointerException("无效的key文件路径"); } encryptData(filename,filenamekey); } /** * 加密类文件 * @param filename String 原始的类文件 * @param encryptfile String 加密后的类文件 * @throws IOException * @throws InvalidKeyException * @throws NoSuchAlgorithmException * @throws InvalidKeySpecException * @throws NoSuchPaddingException * @throws NoSuchAlgorithmException * @throws BadPaddingException * @throws IllegalBlockSizeException * @throws IllegalStateException */ private void encryptData(String filename,String encryptfile) throws IOException, InvalidKeyException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, NoSuchAlgorithmException, BadPaddingException, IllegalBlockSizeException, IllegalStateException, ClassNotFoundException, SecurityException, NoSuchMethodException, InvocationTargetException, IllegalArgumentException, IllegalAccessException, InstantiationException { byte data[]=Util.readFile(filename); // 执行加密操作 byte encryptedClassData[] = getencryptData(data); // 保存加密后的文件,覆盖原有的类文件。 Util.writeFile(encryptedClassData,encryptfile); } /** * 直接获得加密数据 * @param bytes byte[] * @throws IllegalStateException * @throws IllegalBlockSizeException * @throws BadPaddingException * @throws InvalidKeyException * @throws NoSuchPaddingException * @throws InvalidKeySpecException * @throws NoSuchAlgorithmException * @throws InstantiationException * @throws IllegalAccessException * @throws IllegalArgumentException * @throws InvocationTargetException * @throws NoSuchMethodException * @throws SecurityException * @throws ClassNotFoundException * @throws IOException * @return byte[] */ public byte[] createEncryptData(byte[] bytes) throws IllegalStateException, IllegalBlockSizeException, BadPaddingException, InvalidKeyException, NoSuchPaddingException, InvalidKeySpecException, NoSuchAlgorithmException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException, ClassNotFoundException, IOException { bytes=getencryptData(bytes); return bytes; } private byte[] getencryptData(byte[] bytes) throws IOException, ClassNotFoundException, SecurityException, NoSuchMethodException, InvocationTargetException, IllegalArgumentException, IllegalAccessException, InstantiationException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException, IllegalStateException { // 产生一个可信任的随机数源 SecureRandom sr = new SecureRandom(); //从密钥文件key Filename中得到密钥数据 byte[] rawKeyData = Util.readFile(keyfile); // 从原始密钥数据创建DESKeySpec对象 Class classkeyspec=Class.forName(Util.getValue("keyspec")); Constructor constructor = classkeyspec.getConstructor(new Class[]{byte[].class}); KeySpec dks = (KeySpec) constructor.newInstance(new Object[]{rawKeyData}); // 创建一个密钥工厂,然后用它把DESKeySpec转换成SecretKey对象 SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(Util.getAlgorithm()); SecretKey key = keyFactory.generateSecret(dks); // Cipher对象实际完成加密操作 Cipher cipher = Cipher.getInstance(Util.getAlgorithm()); // 用密钥初始化Cipher对象 cipher.init(Cipher.ENCRYPT_MODE, key, sr); // 执行加密操作 bytes = cipher.doFinal(bytes); // 返回字节数组 return bytes; } /** * 设置key文件路径 * @param keyfile String */ public void setKeyFile(String keyfile) { this.keyfile=keyfile; } }
2022-06-04 16:10:47 10KB 加密 解密 算法 Java源码
1
用C#编写的通讯录管理系统,窗体应用程序,程度综合实验作业,有联系人的显示、插入、删除、查询、按关键字查询,多个窗体,同时还对文件的读写进行了解密加密操作。
2022-06-04 10:40:45 1.73MB C# 通讯录系统 文件加密 程序实验作业
1
亿彩文件批量加密合并捆绑器,软件适用于将需要保护的文件装入到宿主文件中,达到安全保护机密文件,不允许随便查看的目的;或者将需要广告的内容绑入exe宿主文件中,在打开
1
文件夹加密超级大师一款专业的数据加密软件,拥有五种加密方法,可以满足各种不同的加密需求。软件在加密时拥有超快的加密速度,而且可以做到防删除、防复制、防移动。另外还拥有磁盘保护、万能锁、数据粉碎等多种强大的功能。
2022-05-27 19:00:17 8.11MB 源码软件
1
采用cpp实现文件加密,加密算法包括凯撒加密、异或加密、四方加密、栅栏加密、base64加密。
2022-05-25 15:20:38 1.17MB c++文件加密
1
VB现实的文件加密工具,通过选择一个文件,进而对该文件进行单独的加密,加密成功后会在其同目录下产生一个加密后的文件,加密后的文件只有进行逆向解密操作才能正常打开。也可以批量加密所选文件所在文件夹内所有文件。
2022-05-25 11:14:11 8KB vb 文件加密
1