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 Aug 4, 2021. It is now read-only.
I am trying to read the database file from a specified app, encrypt it, and save it to external SD CARD.
When I try to get it back, the file contents are not the same.
//Get databaseFile uncryptedbyte[] originalDbBytes = storage.readFile("database/path");
//This file is okstorage.createFile("path/original/file", originalDbBytes);
//Add encryption for testing purpose onlyStringIVX = "abcdefghijklmnop"; // 16 lenght - not secretStringSECRET_KEY = "secret1234567890"; // 16 lenght - secretbyte[] SALT = "0000111100001111".getBytes(); // random 16 bytes arrayEncryptConfigurationconfiguration = newEncryptConfiguration.Builder()
.setEncryptContent(IVX, SECRET_KEY, SALT)
.build();
//Configure the encription on storage instancestorage.setEncryptConfiguration(configuration);
//Create encrypted file.storage.createFile("path/encrypted/file", originalDbBytes);
//Read encripted file.byte[] bytes = storage.readFile("path/encrypted/file");
//Write decrypted file-storage.createFile("path/decrypted/file", bytes);
decryptedfileisinvalidAnyhintsonthis? Shouldthisworkonlywithtextfiles?
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 am trying to read the database file from a specified app, encrypt it, and save it to external SD CARD.
When I try to get it back, the file contents are not the same.
The text was updated successfully, but these errors were encountered: