pvasa / easycrypt Goto Github PK
View Code? Open in Web Editor NEWAndroid cryptography library with SecureRandom patches.
License: Apache License 2.0
Android cryptography library with SecureRandom patches.
License: Apache License 2.0
Hi there, please i need help with this question in stackoverflow:
https://stackoverflow.com/questions/55662883/encrypt-data-with-cryptoswift-coming-from-easycrypt
The android developer used this library inside one application but when i try to decrypt data from iOS (with CryptoSwift), i don't get the excepted results. Some help please ??
Describe the bug
Release 1.3.5 build is broken.
https://jitpack.io/com/github/pvasa/EasyCrypt/1.3.5/build.log
To Reproduce
Steps to reproduce the behavior:
See log: https://jitpack.io/com/github/pvasa/EasyCrypt/1.3.5/build.log
Expected behavior
Library should install correctly when installed using Gradle. Currently only the randomorg package is built inside the library.
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Early 2022 Jcenter will become unavailable. This is currently the only source to obtain this package. Migration to Jitpack or MavenCentral could solve the problem.
Thank you for this project. I have a hex signature string, what do I need to convert it to in order to use the eCryptAsymmetric.verify()
function? Thank you
I am trying to run a method once the encryption is done with the help of the ECResultListener like below:
String fileKey = "123456";
ECSymmetric ecSymmetric = new ECSymmetric();
ecSymmetric.encrypt(orginaFile, fileKey, new ECResultListener() {
@Override
public void onProgress(int newBytes, long processedBytes, long totalBytes) {
}
@Override
public <T> void onSuccess(T t) {
Toasty.success(singleChatActivity.this, "ENCRYPTED").show(); // DOESN'T display although there is an encrypted file as an result
}
@Override
public void onFailure(String s, Exception e) {
}
}, encryptedFile);
Any help?
Cannot access library classes after importing from jcenter
I am trying to decrypt an image after the downloading from Firebase storage directly (in OnSuccessListener) and the log of the progress of decryption works till it reaches 99% and gives the following error:
Cannot write to file.java.io.IOException: Error while finalizing cipher
Please note:
Any recommendations for this?
EDIT: to clarify the problem - encryption and decryption on the same platform works! The problem is when you encrypt information on some platforms and then afterwards, decryption of this data is attempted on others. I've seem compatibility problems between these ranges of API versions:
meaning, encryption-decryption between devices in each range works, but between devices in different ranges doesn't.
ORIGINAL post:
W/System.err: javax.crypto.BadPaddingException: error:1e000065:Cipher functions:OPENSSL_internal:BAD_DECRYPT
W/System.err: at com.android.org.conscrypt.NativeCrypto.EVP_CipherFinal_ex(Native Method)
W/System.err: at com.android.org.conscrypt.OpenSSLCipher$EVP_CIPHER.doFinalInternal(OpenSSLCipher.java:570)
W/System.err: at com.android.org.conscrypt.OpenSSLCipher.engineDoFinal(OpenSSLCipher.java:351)
W/System.err: at javax.crypto.Cipher.doFinal(Cipher.java:1736)
W/System.err: at com.pvryan.easycrypt.symmetric.performDecrypt.invoke$easycrypt_release(performDecrypt.kt:70)
W/System.err: at com.pvryan.easycrypt.symmetric.ECSymmetric$decrypt$1.invoke(ECSymmetric.kt:209)
W/System.err: at com.pvryan.easycrypt.symmetric.ECSymmetric$decrypt$1.invoke(ECSymmetric.kt:44)
W/System.err: at org.jetbrains.anko.AsyncKt$doAsync$1.invoke(Async.kt:140)
W/System.err: at org.jetbrains.anko.AsyncKt$doAsync$1.invoke(Unknown Source:0)
W/System.err: at org.jetbrains.anko.AsyncKt$sam$Callable$761a5578.call(Unknown Source:2)
W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
W/System.err: at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
W/System.err: at java.lang.Thread.run(Thread.java:764)
It seems that this library is experiencing the same issue found in this other library below (in an older version, they fixed it by enforcing usage of Bouncy Castle instead of the new default provider on Android 6.0 onwards).
Please also make this library enforce usage of Bouncy Castle as well as a workaround at least until a fix is found using the new provider on API 23 onwards.
EDIT: As I mention below, apparently just doing this workaround won't be enough :(
I tested on an emulator with API 26.
Thank you!
I am trying to send encrypted files through Firebase storage, when the same encryption/decryption works pretty fine on the same device where I encrypt the data, it gives the following error after 99% of the decryption on another device:
E/Cannot write to file.: java.io.IOException: Error while finalizing cipher
Please note that the encryption string key is the same and also the same function to decrypt the file in both devices. Is there something I am missing here?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.