SecuredConnection constructor
SecuredConnection(
- TransportConn _connection,
- SecretKey _encryptionKey,
- SecretKey _decryptionKey, {
- PeerId? establishedRemotePeer,
- PublicKey? establishedRemotePublicKey,
- required String securityProtocolId,
Implementation
SecuredConnection(
this._connection,
this._encryptionKey,
this._decryptionKey, {
this.establishedRemotePeer,
this.establishedRemotePublicKey,
required this.securityProtocolId, // Make it required
}) {
// ADDED LOGGING
_log.finer('SecuredConnection Constructor: Peer ${establishedRemotePeer?.toString() ?? 'unknown'}');
_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'));
}