feat: Allow calculating fingerprints
This commit is contained in:
19
lib/src/omemo/fingerprint.dart
Normal file
19
lib/src/omemo/fingerprint.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:meta/meta.dart';
|
||||
|
||||
@immutable
|
||||
class DeviceFingerprint {
|
||||
|
||||
const DeviceFingerprint(this.deviceId, this.fingerprint);
|
||||
final String fingerprint;
|
||||
final int deviceId;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return other is DeviceFingerprint &&
|
||||
fingerprint == other.fingerprint &&
|
||||
deviceId == other.deviceId;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => fingerprint.hashCode ^ deviceId.hashCode;
|
||||
}
|
||||
Reference in New Issue
Block a user