Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
Signed-off-by: Nguyen Van Nguyen <[email protected]>
  • Loading branch information
nguyennv committed Dec 11, 2024
1 parent bdc5da9 commit 9021347
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions lib/src/message/literal_message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,6 @@ final class LiteralMessage extends BaseMessage
final Iterable<String> passwords = const [],
final SymmetricAlgorithm symmetric = SymmetricAlgorithm.aes128,
}) {
if (encryptionKeys.isEmpty && passwords.isEmpty) {
throw ArgumentError(
'No encryption keys or passwords provided.',
);
}
var addPadding = true;
for (final key in encryptionKeys) {
if (!key.keyPacket.isV6Key) {
Expand Down Expand Up @@ -202,7 +197,7 @@ final class LiteralMessage extends BaseMessage
SymEncryptedIntegrityProtectedDataPacket.encryptPackets(
sessionKey.encryptionKey,
packetList,
symmetric: symmetric,
symmetric: sessionKey.symmetric,
aead: sessionKey.aead,
),
]));
Expand Down

0 comments on commit 9021347

Please sign in to comment.