首页 开发技术 Java     /    文件加密解密算法(Java源码)

文件加密解密算法(Java源码)

上传者: hexiang221 | 上传时间:2020/11/23 9:41:04 | 文件大小:10KB | 文件类型:rar
文件加密解密算法(Java源码)
文件加密解密算法(Java源码)java,file,算法,加密解密,java源码packagecom.crypto.encrypt;importjava.security.SecureRandom;importjava.io.*;importjavax.crypto.spec.DESKeySpec;importjavax.crypto.SecretKey;importjavax.crypto.SecretKeyFactory;importjavax.crypto.Cipher;importjava.security.InvalidKeyException;importjava.security.NoSuchAlgorithmException;importjava.security.spec.InvalidKeySpecException;importjavax.crypto.NoSuchPaddingException;importjavax.crypto.BadPaddingException;importjavax.crypto.IllegalBlockSizeException;importjava.lang.reflect.Constructor;importjava.security.spec.KeySpec;importjava.lang.reflect.InvocationTargetException;publicclassEncryptData{privateStringkeyfile=null;publicEncryptData(){}publicEncryptData(Stringkeyfile){this.keyfile=keyfile;}/***加密文件*@paramfilenameString源路径*@paramfilenamekeyString加密后的路径*/publicvoidcreateEncryptData(Stringfilename,Stringfilenamekey)throwsIllegalStateException,IllegalBlockSizeException,BadPaddingException,NoSuchPaddingException,InvalidKeySpecException,NoSuchAlgorithmException,InvalidKeyException,IOException,InstantiationException,IllegalAccessException,IllegalArgumentException,InvocationTargetException,NoSuchMethodException,SecurityException,ClassNotFoundException,IllegalStateException,IllegalBlockSizeException,BadPaddingException,NoSuchPaddingException,InvalidKeySpecException,NoSuchAlgorithmException,InvalidKeyException,IOException{//验证keyfileif(keyfile==null||keyfile.equals("")){thrownewNullPointerException("有效的key文件路径");}encryptData(filename,filenamekey);}/***加密类文件*@paramfilenameString原始的类文件*@paramencryptfileString加密后的类文件*@throwsIOException*@throwsInvalidKeyException*@throwsNoSuchAlgorithmException*@throwsInvalidKeySpecException*@throwsNoSuchPaddingException*@thro 本软件ID:2026669

文件下载

资源详情

[{"title":"(7个子文件10KB)文件加密解密算法(Java源码)","children":[{"title":"文件加密解密","children":[{"title":"com","children":[{"title":"crypto","children":[{"title":"encrypt","children":[{"title":"Util.java <span style='color:#111;'>2.58KB</span>","children":null,"spread":false},{"title":"EncryptData.java <span style='color:#111;'>5.44KB</span>","children":null,"spread":false},{"title":"CreateKey.java <span style='color:#111;'>1.38KB</span>","children":null,"spread":false},{"title":"UnEncryptData.java <span style='color:#111;'>6.05KB</span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"resource","children":[{"title":"key <span style='color:#111;'>8B</span>","children":null,"spread":false},{"title":"algorithm.properties <span style='color:#111;'>76B</span>","children":null,"spread":false}],"spread":true},{"title":"des.jar <span style='color:#111;'>12.76KB</span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

  • xiuyuanvip:
    javaAPI加密方法,,对初学的有帮助2015-09-16
  • sanmei12222:
    不错哦,可以用,实际中应用可以直接用2015-07-25
  • zhangjianjun8908:
    哈哈,挺不错的资源,很好用哈!2014-09-19
  • kxj19850116_3:
    还不错,学习中。2014-07-22
  • nicky0318:
    挺好,可以直接使用的哦2014-05-20

免责申明

【好快吧下载】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【好快吧下载】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【好快吧下载】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,8686821#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明