Android慢速AES解密

Android slow AES decryption(Android慢速AES解密)
本文介绍了Android慢速AES解密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

参考:Android 加密/解密问题 (AES)

我正在构建一个 android 应用程序,它需要对一个非常大的包(~50Mb)进行 aes 解密,并且在 android 的内置 aes 解密机制中实现时非常慢(大约 5 分钟).

I am building an android app which requires aes decryption of a really large package (~50Mb) and it is really slow when implemented in android's inbuilt aes decryption mechanism (around 5 minutes).

基于 SO 中的上述帖子,我尝试使用 ndk 并尝试下载本机库 (openssl) 以用于此应用程序.但是,适用于 android 的 openssl 文件非常多,我不知道要使用哪些文件来创建 .so 文件.

Based on the above posts in SO, I attempted to use ndk and tried to download native libraries (openssl) to use for this app. However, openssl for android has a really large number of files and I do not know which ones to use to create the .so file.

我对在 android 应用程序中使用 ndk 和本机代码非常缺乏经验,并且会发现任何关于如何使用 openssl 库进行 aes 解密的建议/示例代码非常有用.

I am quite inexperienced with the use of ndk and native code in android apps and would find any suggestions/sample code on how to use openssl library for aes decryption really useful.

提前致谢,纳文

推荐答案

试试 SpongyCastle 它的一个重新包装的 BouncyCastle 不会与 Android 发布的相冲突.Android 系统上的那个是旧的(如果你有一个包含它的 Android 版本).

Try SpongyCastle its a repackaged BouncyCastle that wont conflict with the one released with Android. The one on Android systems is old (if you even have a release of Android that includes it).

这应该就是您所需要的.

This should be all you need.

这篇关于Android慢速AES解密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Reliable implementation of PBKDF2-HMAC-SHA256 for JAVA(PBKDF2-HMAC-SHA256 for JAVA 的可靠实现)
Correct way to sign and verify signature using bouncycastle(使用 bouncycastle 签名和验证签名的正确方法)
Creating RSA Public Key From String(从字符串创建 RSA 公钥)
Why java.security.NoSuchProviderException No such provider: BC?(为什么 java.security.NoSuchProviderException 没有这样的提供者:BC?)
Generating X509 Certificate using Bouncy Castle Java(使用 Bouncy Castle Java 生成 X509 证书)
How can I get a PublicKey object from EC public key bytes?(如何从 EC 公钥字节中获取 PublicKey 对象?)