diff --git a/CHANGELOG.md b/CHANGELOG.md index c20d6518..8be64e43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,3 +40,10 @@ ## 1.2.0 (2024-01-03) - Support AEAD algorithms: EAX, OCB, GCM + +## 1.3.0 (2024-09-13) +- Require version 3.2.0 sdk +- Update pinenacl to version 0.6.0 +- Update pointycastle to version 3.9.1 +- Fix packet reader +- Fix AEAD crypt diff --git a/lib/src/packet/packet_reader.dart b/lib/src/packet/packet_reader.dart index 0fb0ba5d..e4712243 100644 --- a/lib/src/packet/packet_reader.dart +++ b/lib/src/packet/packet_reader.dart @@ -19,7 +19,9 @@ class PacketReader { PacketReader(this.tag, this.data, this.offset); factory PacketReader.read(final Uint8List bytes, [final int offset = 0]) { - if (bytes.length <= offset || bytes.sublist(offset).length < 2 || (bytes[offset] & 0x80) == 0) { + if (bytes.length <= offset || + bytes.sublist(offset).length < 2 || + (bytes[offset] & 0x80) == 0) { throw StateError( 'Error during parsing. This data probably does not conform to a valid OpenPGP format.', ); @@ -66,17 +68,21 @@ class PacketReader { while (true) { partialLength = bytes[partialPos++]; if (partialLength < 192) { - partialData.add(bytes.sublist(partialPos, partialPos + partialLength)); + partialData + .add(bytes.sublist(partialPos, partialPos + partialLength)); partialPos += partialLength; break; } else if (partialLength < 224) { - partialLength = ((partialLength - 192) << 8) + (bytes[partialPos++]) + 192; - partialData.add(bytes.sublist(partialPos, partialPos + partialLength)); + partialLength = + ((partialLength - 192) << 8) + (bytes[partialPos++]) + 192; + partialData + .add(bytes.sublist(partialPos, partialPos + partialLength)); partialPos += partialLength; break; } else if (partialLength < 255) { partialLength = 1 << (partialLength & 0x1f); - partialData.add(bytes.sublist(partialPos, partialPos + partialLength)); + partialData + .add(bytes.sublist(partialPos, partialPos + partialLength)); partialPos += partialLength; } else { partialLength = bytes @@ -86,7 +92,8 @@ class PacketReader { ) .toInt32(); partialPos += 4; - partialData.add(bytes.sublist(partialPos, partialPos + partialLength)); + partialData + .add(bytes.sublist(partialPos, partialPos + partialLength)); partialPos += partialLength; break; } diff --git a/pubspec.yaml b/pubspec.yaml index 4bcb4b9a..fcf21e3c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: dart_pg description: Dart PG (Dart Privacy Guard) - The OpenPGP implementation in Dart language. -version: 1.2.0 +version: 1.3.0 homepage: https://github.com/web-of-trust/dart-pg environment: