From cc24d179b6a110f8db6a58fc8c130c2e925a4c80 Mon Sep 17 00:00:00 2001 From: tzanou Date: Fri, 17 Nov 2023 14:33:49 +0100 Subject: [PATCH 1/2] Error: A value of type 'List' can't be assigned to a variable of type 'Uint8List'. https://github.com/Enough-Software/enough_mail/issues/224 --- lib/src/private/smtp/commands/smtp_auth_cram_md5_command.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/private/smtp/commands/smtp_auth_cram_md5_command.dart b/lib/src/private/smtp/commands/smtp_auth_cram_md5_command.dart index 24519ab8..847f68f9 100644 --- a/lib/src/private/smtp/commands/smtp_auth_cram_md5_command.dart +++ b/lib/src/private/smtp/commands/smtp_auth_cram_md5_command.dart @@ -47,7 +47,7 @@ S: 235 Authentication succeeded var password = utf8.encode(_password!); if (password.length > 64) { final passwordDigest = md5.convert(password); - password = passwordDigest.bytes; + password = Uint8List.fromList(passwordDigest.bytes); } final nonce = base64.decode(base64Nonce); final hmac = Hmac(md5, password); From af9a15bfd733a07fbafd3ea190fb26dd849ea8b5 Mon Sep 17 00:00:00 2001 From: tzanou Date: Fri, 17 Nov 2023 14:41:01 +0100 Subject: [PATCH 2/2] Update smtp_auth_cram_md5_command.dart add typed_data to import file --- lib/src/private/smtp/commands/smtp_auth_cram_md5_command.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/private/smtp/commands/smtp_auth_cram_md5_command.dart b/lib/src/private/smtp/commands/smtp_auth_cram_md5_command.dart index 847f68f9..8f8cbbf0 100644 --- a/lib/src/private/smtp/commands/smtp_auth_cram_md5_command.dart +++ b/lib/src/private/smtp/commands/smtp_auth_cram_md5_command.dart @@ -1,6 +1,6 @@ import 'dart:convert'; import 'package:crypto/crypto.dart'; - +import 'dart:typed_data'; import '../../../smtp/smtp_response.dart'; import '../smtp_command.dart';