You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.
I'm trying to decrypt an encrypted file in the assets directory. I'm loading it with AssetManager.openFd() and using this method to get the String:
private String readBytes(AssetFileDescriptor file){
int size = (int) file.getLength();
byte[] bytes = new byte[size];
try {
BufferedInputStream buf = new BufferedInputStream(file.createInputStream());
buf.read(bytes, 0, bytes.length);
buf.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return new String(bytes);
}
This returned string is used in the rnCryptorNative.decrypt(String, password) method. It always returns an empty String. I'm able to decrypt these same files in an Xcode project using RNCryptor just fine. Any suggestions to get this working?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to decrypt an encrypted file in the assets directory. I'm loading it with
AssetManager.openFd()
and using this method to get theString
:This returned string is used in the
rnCryptorNative.decrypt(String, password)
method. It always returns an empty String. I'm able to decrypt these same files in an Xcode project usingRNCryptor
just fine. Any suggestions to get this working?The text was updated successfully, but these errors were encountered: