本文介绍了Android的zip文件认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能,如果我要创建我的应用程序需要压缩的视频和用户必须有密码认证打开文件?
Is it possible if I want to create my application that need to zip the video and user must have password authentication to open file ?
如果它poosible,可你们给我提供了一些例子code?谢谢 ,问候
If it poosible , could you guys provide me some of example code ?Thanks ,Regards
推荐答案
尝试是这样的:
OutputStream out = new ZipOutputStream(new CipherOutputStream(new FileOutputStream(...)), cipher);
和周围的其他方式:
InputStream in = new ZipInputStream(new CipherInputStream(new FileInputStream(...)), cipher);
有关创建密码,请参阅: http://developer.android.com /reference/javax/crypto/Cipher.html
For creating the cipher, see: http://developer.android.com/reference/javax/crypto/Cipher.html
这篇关于Android的zip文件认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!