SecuredConnection constructor
SecuredConnection(})
Implementation
SecuredConnection(
this._connection,
this._encryptionKey,
this._decryptionKey, {
this.establishedRemotePeer,
this.establishedRemotePublicKey,
required this.securityProtocolId, // Make it required
int initialSendNonce = 0,
int initialRecvNonce = 0,
}) : _sendNonce = initialSendNonce,
_recvNonce = initialRecvNonce {
// ADDED LOGGING
_log.finer(
'SecuredConnection Constructor: Peer ${establishedRemotePeer?.toString() ?? 'unknown'}, initialSendNonce=$initialSendNonce, initialRecvNonce=$initialRecvNonce');
_log.finer(' - _encryptionKey.hashCode: ${_encryptionKey.hashCode}');
_encryptionKey
.extractBytes()
.then((bytes) => _log.finer(' - _encryptionKey.bytes: $bytes'));
_log.finer(' - _decryptionKey.hashCode: ${_decryptionKey.hashCode}');
_decryptionKey
.extractBytes()
.then((bytes) => _log.finer(' - _decryptionKey.bytes: $bytes'));
}