Skip to content

Commit

Permalink
Dart add operator== to LocalPassord
Browse files Browse the repository at this point in the history
  • Loading branch information
inetic committed Sep 17, 2024
1 parent 027e58b commit 05851e5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bindings/dart/lib/local_secret.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ class LocalPassword implements LocalSecret, SetLocalSecret {
// Discourage from writing local secret into the log.
@override
String toString() => "LocalPassword(***)";

@override
bool operator ==(Object other) {
if (other is! LocalPassword) return false;
return string == other.string;
}
}

class LocalSecretKey implements LocalSecret {
Expand Down

0 comments on commit 05851e5

Please sign in to comment.