开发者

Password Protection for Images on Android

开发者 https://www.devze.com 2023-02-06 13:34 出处:网络
I am planning to create an application which protects images from unauthorized access by anyone. What I\'m planning to do is protect t开发者_StackOverflow社区he images by putting a password in the ima

I am planning to create an application which protects images from unauthorized access by anyone. What I'm planning to do is protect t开发者_StackOverflow社区he images by putting a password in the image so that every time I view the image it will prompt to input first the password assigned. How can I do this? or is it possible?


You can probably find a way to store a password somewhere in the data of an image file, but you cannot force the consumers of that image file to enter a password or otherwise restrict access to the image from the image itself. Images aren't programs.

@walkingTarget's comment would be the best way to universally restrict access to the image -- encrypt the image file using some user-definable key. Your question then becomes "how do I encrypt/decrypt files in Java on the Android platform?" This SO question might nudge you toward an answer.


You may use zip with password to encrypt the image and then use android to open it by prompting the user to give password

0

精彩评论

暂无评论...
验证码 换一张
取 消