mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-25 07:08:30 +01:00
Read buffer helper
This commit is contained in:
@@ -717,10 +717,8 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
||||
else {
|
||||
byte[] salt = new byte[16];
|
||||
byte[] prefix = new byte[16];
|
||||
if (raw.read(salt) != salt.length)
|
||||
throw new IOException("Invalid file size");
|
||||
if (raw.read(prefix) != prefix.length)
|
||||
throw new IOException("Invalid file size");
|
||||
Helper.readBuffer(raw, salt);
|
||||
Helper.readBuffer(raw, prefix);
|
||||
|
||||
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
|
||||
KeySpec keySpec = new PBEKeySpec(password.toCharArray(), salt, KEY_ITERATIONS, KEY_LENGTH);
|
||||
|
||||
Reference in New Issue
Block a user