fix: potentially fix SSSS passphrase not working for some accounts

This commit is contained in:
Sorunome 2020-09-07 16:19:19 +02:00
parent f7e63097b4
commit 8a104b34ff
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
1 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import 'dart:core';
import 'dart:convert';
import 'dart:typed_data';
@ -133,7 +134,7 @@ class SSSS {
}
final generator = PBKDF2(hashAlgorithm: sha512);
return Uint8List.fromList(generator.generateKey(passphrase, info.salt,
info.iterations, info.bits != null ? info.bits / 8 : 32));
info.iterations, info.bits != null ? (info.bits / 8).ceil() : 32));
}
void setValidator(String type, Future<bool> Function(String) validator) {