forked from hardcoresushi/DroidFS
Opening reverse mode volumes
This commit is contained in:
parent
1dbf94b83f
commit
4d47306b29
@ -15,7 +15,7 @@ android {
|
|||||||
applicationId "sushi.hardcore.droidfs"
|
applicationId "sushi.hardcore.droidfs"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 8
|
versionCode 9
|
||||||
versionName "1.4.1"
|
versionName "1.4.1"
|
||||||
|
|
||||||
ndk {
|
ndk {
|
||||||
|
@ -475,7 +475,7 @@ func truncate(sessionID, handleID int, newSize uint64) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func init_new_session(root_cipher_dir string, masterkey []byte) int {
|
func init_new_session(root_cipher_dir string, masterkey []byte, cf *configfile.ConfFile) int {
|
||||||
// Initialize EME for filename encryption.
|
// Initialize EME for filename encryption.
|
||||||
var emeCipher *eme.EMECipher
|
var emeCipher *eme.EMECipher
|
||||||
var err error
|
var err error
|
||||||
@ -492,7 +492,9 @@ func init_new_session(root_cipher_dir string, masterkey []byte) int {
|
|||||||
|
|
||||||
// Initialize contentEnc
|
// Initialize contentEnc
|
||||||
cryptoBackend := cryptocore.BackendGoGCM
|
cryptoBackend := cryptocore.BackendGoGCM
|
||||||
if stupidgcm.PreferOpenSSL() {
|
if cf.IsFeatureFlagSet(configfile.FlagAESSIV) {
|
||||||
|
cryptoBackend = cryptocore.BackendAESSIV
|
||||||
|
} else if stupidgcm.PreferOpenSSL() {
|
||||||
cryptoBackend = cryptocore.BackendOpenSSL
|
cryptoBackend = cryptocore.BackendOpenSSL
|
||||||
}
|
}
|
||||||
forcedecode := false
|
forcedecode := false
|
||||||
@ -535,7 +537,7 @@ func gcf_init(root_cipher_dir string, password, givenScryptHash, returnedScryptH
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
masterkey := cf.GetMasterkey(password, givenScryptHash, returnedScryptHashBuff)
|
masterkey := cf.GetMasterkey(password, givenScryptHash, returnedScryptHashBuff)
|
||||||
if masterkey != nil {
|
if masterkey != nil {
|
||||||
sessionID = init_new_session(root_cipher_dir, masterkey)
|
sessionID = init_new_session(root_cipher_dir, masterkey, cf)
|
||||||
wipe(masterkey)
|
wipe(masterkey)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user