twonly-app-dependencies/libsignal_protocol_dart/lib/src/signal_protocol_address.dart
2025-12-07 16:10:41 +01:00

26 lines
540 B
Dart

import 'package:meta/meta.dart';
@immutable
class SignalProtocolAddress {
const SignalProtocolAddress(this._name, this._deviceId);
final String _name;
final int _deviceId;
String getName() => _name;
int getDeviceId() => _deviceId;
@override
String toString() => '$_name:$_deviceId';
@override
bool operator ==(Object other) {
if (other is! SignalProtocolAddress) return false;
return _name == other._name && _deviceId == other._deviceId;
}
@override
int get hashCode => _name.hashCode ^ _deviceId;
}