iPhone文件文件夹库/缓存安全问题 [英] iPhone Documents Folder Library/Caches Security issue

查看:229
本文介绍了iPhone文件文件夹库/缓存安全问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个iOS应用程序。出于安全原因,我将所有音频/视频文件下载到库/缓存下的文档文件夹中。



对于使用iTunes,这个视频备份。但一些外部软件很容易打开图书馆/缓存和从这个文件夹下载所有文件。



我的问题是如何保护这个库/ Caches文件夹或如何将不可见文件存储到文档目录。

解决方案

我们无法隐藏文件夹内的文件。我们可以选择将文件制作成NSDATA和制作DRM(一些自己的算法)。b
$ b

示例:


  1. 获取文件到NSData并添加一些字节到NSData,所以这个文件被加密。如果有人打开这个文件意味着他们不能打开它。

例如:

原始文件数据:ABCDEF

加密数据(添加一些内容/字节):A%GB * CDE)F

注意:没有人不能打开这个文件,因为我们将一些内容添加到原文件中,因此它不是有效文件。


    <



    例如:


    $ b $对于编程​​方式,当打开文件时,您将删除字节,然后您可以正确地读取文件。 b

    加密的数据(添加一些内容/字节):A%GB * CDE)F

    我们需要删除额外内容:%G *)



    原始文件数据:ABCDEF


    非常重要:不要使用第三方算法。您将自行创建算法。



    谢谢,


    I am developed one iOS Application. For security reason I downloaded All Audio/Video files to Documents folder under Library/Caches.

    For using iTunes the end user can't take this video backups. But some of the External softwares easily open the Library/Caches and download all files from this folders.

    My question is How to secure This Library/Caches folder or How to Not visibly stored files to Documents Directory.

    解决方案

    We can't Hide files inside folder. we have option to make Files to NSDATA and Make DRM(Some own algorithms)

    Example:

    1. Get Files to NSData and Add Some Bytes to NSData, so this file is encrypted. if some one open this file means they can't open it.

    Ex:

    Original file data : ABCDEF

    Encrypted Data(Add Some Contents/Bytes) : A%GB*CDE)F

    Note : No one can't open this file because we add some contents to original file so its not valid file.

    1. For Programatically when opening file you will remove the bytes then you can read file properly.

      Ex:

      Encrypted Data(Add Some Contents/Bytes) : A%GB*CDE)F

      We need to remove Extra contents : %G*)

      Original file data : ABCDEF

    Very Important : Don't use Third party algorithms. You will make your own algorithm.

    Thanks,

    这篇关于iPhone文件文件夹库/缓存安全问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆