For example, use the webview to load a picture, there is provided a method of internal webview incoming resources url, but this picture is encrypted, which need to be decrypted before passing, and in order to ensure data security ban after decryption The resource files stored in clear text, it can not directly use the present method passing url, have not received similar "file data stream," the loading method, or other technical means?
Reply:
Asynchronously downloaded, get a NSData, then decrypt, and then displayed in the webview.
Reply:
Do not bother to download first, encryption resources saved locally, upstairs can specifically under "decrypt" -> "is displayed in webview" details in the middle of it? For example, you can call interface, the need for data type conversion Han?
Reply:
Decryption algorithm you want to know
NSData equivalent of a binary array decryption algorithm can be directly used to generate images of the plaintext data.
UIImage class has several functions that can be generated by the NSData UIImage.
With UIImage object, as the display would not have said it
Reply:
I understand you need is a picture of the data encryption.
If other, such as encryption, access URL, my thinking is not right
Reply:
to ybh37:
I was not clear, webview to load a web page, the web resource referenced in encrypted images, in the final analysis is the webview final rendering interface has no way to be transferred.
Reply:
Still feel there is a big nod last year, has done an iPad browser for webview little understanding ......
Want to know, LZ said encryption picture, if direct access to the corresponding URL, can be downloaded to a local?
If you can get the picture data (even if it is encrypted), and we know the decryption algorithm under the premise of a very simple question should be.
The big deal is also downloaded to the local html file, and then use js to change the img scr, then loaded into webview.
If the picture is called theft even, URL character encryption technology to prevent the download, you think of other ways.
Know what I mean?
Reply:
I did not do ios development, is now the spot to local decryption can be done, but the decrypted image prohibited saved locally, so you can not pass url to webview directly, only operate the memory array decrypted. Images can not be saved in any form, or also encrypt what ah?
I have seen the local data:
1, html files;
2, js script;
3, encrypted resource files for web display;
You say "js change the img scr" What does that mean specifically? I understand what you mean, like you did not understand what I mean, ah, ha ~
Reply:
Oh, sorry, I'm wrong, scr should be src
Such as:
img class = "logo" alt = "" src = "http://c.csdn.net/bbs/t/5/i/pic_logo.gif"
The pic_logo.gif downloaded to the local post, corresponding to the src = "http://c.csdn.net/bbs/t/5/i/pic_logo.gif" replace the local path.
Understand the meaning of targeted after a ......
Decrypted images stored locally does not allow it, relatively little trouble ......... about the content does not show up ...
Illegal characters actually prompted me, I will give the message you stand up, please check.
Reply:
Expert
Reply:
Oh, still do not understand, I am by your research under way again, thank!
No comments:
Post a Comment