Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/noloader/android-prng
Sample Android shared object which depends on Crypto++ library shared object.
https://github.com/noloader/android-prng
Last synced: about 16 hours ago
JSON representation
Sample Android shared object which depends on Crypto++ library shared object.
- Host: GitHub
- URL: https://github.com/noloader/android-prng
- Owner: noloader
- Created: 2015-12-08T22:24:17.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-02-06T21:58:42.000Z (almost 4 years ago)
- Last Synced: 2023-02-27T00:56:27.872Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 93.8 KB
- Stars: 16
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Android-PRNG is a sample Android NDK project to demonstrate two topics. First, it shows you how to compile a shared object using the Crypto++ library on Android. Second, it shows you how to sample sensors to accumulate seed data to use with a software based random number generator.
The project requires the Crypto++ library built for Android with architectures armeabi-v7a, arm64-v8a, x64 and x86_64. The project looks for them in the following locations based on architecture:
* /usr/local/cryptopp/android-armeabi-v7a
* /usr/local/cryptopp/android-arm64-v8a
* /usr/local/cryptopp/android-x86
* /usr/local/cryptopp/android-x86_64You can create the prerequisites by repeatedly building and installing the Crypto++ library. The steps for the task are:
```bash
git clone https://github.com/weidai11/cryptopp.git
cd cryptopp
cp -p TestScripts/setenv-android.sh .
source ./setenv-android.sh armeabi-v7amake -f GNUmakefile-cross distclean
make -f GNUmakefile-cross static dynamic
sudo make install PREFIX=/usr/local/cryptopp/android-armeabi-v7a
```Lather, rinse, and repeat for each architecture.
Once you have the libraries installed, use `ndk-build` to build the library:
```bash
cd Android-PRNG
ndk-build
```After the native libraries are built, use `ant` to build the APK and install it on a device:
```bash
ant debug install
```Once installed, you should find it in the App Launcher.
### References
The following references from the Crypto++ wiki should be helpful.
* http://www.cryptopp.com/wiki/Android_(Command_Line)
* http://www.cryptopp.com/wiki/Android.mk_(Command_Line)
* http://www.cryptopp.com/wiki/Android_Activity
* http://www.cryptopp.com/wiki/Wrapper_DLL