SecuredConnection constructor

SecuredConnection(
  1. TransportConn _connection,
  2. SecretKey _encryptionKey,
  3. SecretKey _decryptionKey, {
  4. PeerId? establishedRemotePeer,
  5. PublicKey? establishedRemotePublicKey,
  6. 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'));

}