diff --git a/lib/src/kdbx_format.dart b/lib/src/kdbx_format.dart index 3442915..d6dfae1 100644 --- a/lib/src/kdbx_format.dart +++ b/lib/src/kdbx_format.dart @@ -535,9 +535,7 @@ class KdbxFormat { } final credentialHash = credentials.getHash(); - _logger.finest('credentialHash: ${ByteUtils.toHexList(credentialHash)}'); final key = KeyEncrypterKdf(argon2).encrypt(credentialHash, kdfParameters); - _logger.finest('key: ${ByteUtils.toHexList(key)}'); // final keyWithSeed = Uint8List(65); // keyWithSeed.replaceRange(0, masterSeed.length, masterSeed); @@ -574,6 +572,9 @@ class KdbxFormat { .findAllElements('Value') .where((el) => el.getAttribute('Protected')?.toLowerCase() == 'true')) { final pw = gen.decryptBase64(el.text.trim()); + if (pw == null) { + continue; + } KdbxFile.protectedValues[el] = ProtectedValue.fromString(pw); } diff --git a/lib/src/kdbx_header.dart b/lib/src/kdbx_header.dart index dd05f03..eeea3b6 100644 --- a/lib/src/kdbx_header.dart +++ b/lib/src/kdbx_header.dart @@ -353,10 +353,10 @@ class KdbxHeader { final headerId = reader.readUint8(); final int bodySize = versionMajor >= 4 ? reader.readUint32() : reader.readUint16(); - _logger.fine('Reading header with id $headerId (size: $bodySize)}'); +// _logger.fine('Reading header with id $headerId (size: $bodySize)}'); final bodyBytes = bodySize > 0 ? reader.readBytes(bodySize) : null; - _logger.finer( - 'Read header ${fields[headerId]}: ${ByteUtils.toHexList(bodyBytes)}'); +// _logger.finer( +// 'Read header ${fields[headerId]}: ${ByteUtils.toHexList(bodyBytes)}'); if (headerId > 0) { final TE field = fields[headerId]; yield createField(field, bodyBytes);