图片Android的AES加密/解密 [英] Android AES encryption/decryption of images

查看:272
本文介绍了图片Android的AES加密/解密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要找到一种方法来加密/的图像Android.I'm新的Andr​​oid的编程和从未加密解密/解密在其他任何平台,所以请为我提供一个很好的例子,因为我需要学习如何做it.I'm工作,需要加密/解密images.I'll真的很高兴,如果你能帮助我这个项目。 不管怎样,谢谢!

I need to find a way to encrypt/decrypt an images in Android.I'm new in Android programming and never been encrypt/decrypt on any other platform,so please provide me a good example,because I need to learn how to do it.I'm working on a project which needs to encrypt/decrypt images.I'll be really happy if you can help me about this. Thanks anyway!

推荐答案

您可以看看这个#1加密接受的答案

请记住,这很可能会需要大量的时间来进行加密/解密的图像。您还没有设置任何安全标准(安全性如何要这样),​​所以很难给出一个权威的答案

Keep in mind that this is probably going to take a lot of time to encrypt/decrypt images. You also have not set any security standards (how secure must this be) so it's hard to give an authoritative answer

更新

在您的评论这里有一些事情要考虑。通常情况下更快=不太安全。难道你真的想确保图像或只是让他们无法使用未经授权的用户。

After your comment here are a few more things to think about. Typically faster = less secure. Are you really trying to secure the images or just make them unavailable to unauthorized users.

例如,你只希望图像可查看授权的设备上或者你担心它们落入坏人之手?

For instance do you only want the images to be viewable on an authorized device or are you worried about them falling into the wrong hands?

我有其中影象只应的设备,这是经授权的帐户上显示的问题,这是相当容易解决,与用户相关联的唯一的ID帐户被用于对数据进行加密,所以每个用户有自己的在设备上,并在服务器上自己的(唯一的)密钥,加密已完成对在服务器端飞。我也只需要对数据进行加密(头 - 第一个4096字节)的一部分,使其无法使用,我是不是要保持国家安全局从解密的图像,只是让他们被轻易解密,并通过各地。

I had a problem where the images should only be shown on a device that was an authorized account, that was fairly easy to solve, a unique ID associated with the users account was used to encrypt the data, so each user had their own (unique) key on the device and on the server, encryption was done on the fly on the server side. I also only needed to encrypt part of the data (header - first 4096 bytes) to make it unusable, I wasn't trying to keep the NSA from decrypting the images, just keep them from being easily decrypted and passed around.

所以这是足够快和安全,这就是为什么我建议你找出你正在尝试做的,并防止采摘实施计划之前什么。

So that was fast and secure enough, this is why I am suggesting you figure out what you are trying to do and protect against before picking a implementation plan.

这篇关于图片Android的AES加密/解密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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