parseHandshakeMessage method
Parses a handshake message from the remote peer.
Implementation
@override
CryptoPeerCapabilities parseHandshakeMessage(Map<String, dynamic> message) {
final keyExchange = (message['keyExchange'] as List<dynamic>)
.map((e) => _stringToKeyExchangeAlgorithm(e.toString()))
.where((e) => e != null)
.cast<KeyExchangeAlgorithm>()
.toList();
final asymmetric = (message['asymmetric'] as List<dynamic>)
.map((e) => _stringToAlgorithm(e.toString()))
.where((e) => e != null)
.cast<CryptoAlgorithm>()
.toList();
final symmetric = (message['symmetric'] as List<dynamic>)
.map((e) => _stringToAlgorithm(e.toString()))
.where((e) => e != null)
.cast<CryptoAlgorithm>()
.toList();
return CryptoPeerCapabilities(
peerId: message['peerId'].toString(),
keyExchange: keyExchange,
asymmetric: asymmetric,
symmetric: symmetric,
);
}