diff --git a/CHANGELOG.md b/CHANGELOG.md index 75a493e..63dbc94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.0 + +- Upgraded xml package dependency to 4.x + ## 0.3.1 - Fixed error handling nil UUIDs in recycle bin. diff --git a/lib/src/crypto/key_encrypter_kdf.dart b/lib/src/crypto/key_encrypter_kdf.dart index 0cf538b..b529d33 100644 --- a/lib/src/crypto/key_encrypter_kdf.dart +++ b/lib/src/crypto/key_encrypter_kdf.dart @@ -6,7 +6,6 @@ import 'package:crypto/crypto.dart' as crypto; import 'package:isolate/isolate_runner.dart'; import 'package:kdbx/kdbx.dart'; import 'package:kdbx/src/internal/byte_utils.dart'; -import 'package:kdbx/src/internal/crypto_utils.dart'; import 'package:kdbx/src/kdbx_var_dictionary.dart'; import 'package:logging/logging.dart'; import 'package:pointycastle/export.dart'; diff --git a/lib/src/kdbx_format.dart b/lib/src/kdbx_format.dart index eec8c27..efa72b3 100644 --- a/lib/src/kdbx_format.dart +++ b/lib/src/kdbx_format.dart @@ -73,7 +73,7 @@ class KdbxReadWriteContext { static final kdbxContext = Expando(); - static KdbxReadWriteContext kdbxContextForNode(xml.XmlParent node) { + static KdbxReadWriteContext kdbxContextForNode(xml.XmlNode node) { final ret = kdbxContext[node.document]; if (ret == null) { throw StateError('Unable to locate kdbx context for document.'); @@ -82,7 +82,7 @@ class KdbxReadWriteContext { } static void setKdbxContextForNode( - xml.XmlParent node, KdbxReadWriteContext ctx) { + xml.XmlNode node, KdbxReadWriteContext ctx) { kdbxContext[node.document] = ctx; } @@ -141,7 +141,7 @@ class KeyFileCredentials implements CredentialsPart { return KeyFileCredentials._(ProtectedValue.fromBinary( convert.hex.decode(keyFileAsString) as Uint8List)); } - final xmlContent = xml.parse(keyFileAsString); + final xmlContent = xml.XmlDocument.parse(keyFileAsString); final key = xmlContent.findAllElements('Key').single; final dataString = key.findElements('Data').single; final dataBytes = base64.decode(dataString.text); @@ -604,7 +604,7 @@ class KdbxFormat { KdbxReadWriteContext ctx, KdbxHeader header, String xmlString) { final gen = _createProtectedSaltGenerator(header); - final document = xml.parse(xmlString); + final document = xml.XmlDocument.parse(xmlString); KdbxReadWriteContext.setKdbxContextForNode(document, ctx); for (final el in document diff --git a/pubspec.yaml b/pubspec.yaml index 7673650..ebeea57 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,7 +14,7 @@ dependencies: crypto: '>=2.0.0 <3.0.0' pointycastle: '>=1.0.1 <2.0.0' cryptography: ^0.1.2 - xml: '>=3.7.0 <4.0.0' + xml: '>=4.0.0 <5.0.0' uuid: '>=2.0.0 <3.0.0' meta: '>=1.0.0 <2.0.0' clock: '>=1.0.0 <2.0.0'