Skip to content

Commit b0b3995

Browse files
committed
fix: remove Unnecessary casts
1 parent 52e88d4 commit b0b3995

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

cryptography/lib/src/cryptography/cipher.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ abstract class Cipher {
399399
String clearText, {
400400
required SecretKey secretKey,
401401
}) async {
402-
final bytes = utf8.encode(clearText) as Uint8List;
402+
final bytes = utf8.encode(clearText);
403403
final secretBox = await encrypt(
404404
bytes,
405405
secretKey: secretKey,

cryptography/lib/src/cryptography/cipher_wand.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ abstract class CipherWand extends Wand {
177177
/// }
178178
/// ```
179179
Future<SecretBox> encryptString(String clearText) async {
180-
final bytes = utf8.encode(clearText) as Uint8List;
180+
final bytes = utf8.encode(clearText);
181181
final secretBox = await encrypt(
182182
bytes,
183183
possibleBuffer: bytes,

0 commit comments

Comments
 (0)