accept static method
Future<PQSecureChannel>
accept(
- Stream<
List< input,int> > - StreamSink<
List< output, {int> > - required SigningKeyPair identity,
- required String serverId,
- ClientAuthorizer? authorizeClient,
- PostQuantumCryptoEngine? engine,
- PQSecureChannelOptions options = const PQSecureChannelOptions(),
- void destroy()?,
Accepts one client over input / output, proving the server's
identity under the name serverId.
With authorizeClient, the client must authenticate with its own
signing key, and the callback decides whether that key may connect.
destroy is as in connect.
Throws PQSecureChannelException if the handshake fails; the connection is closed in that case.
Implementation
static Future<PQSecureChannel> accept(
Stream<List<int>> input,
StreamSink<List<int>> output, {
required SigningKeyPair identity,
required String serverId,
ClientAuthorizer? authorizeClient,
PostQuantumCryptoEngine? engine,
PQSecureChannelOptions options = const PQSecureChannelOptions(),
void Function()? destroy,
}) => acceptInternal(
input,
output,
identity: identity,
serverId: serverId,
authorizeClient: authorizeClient,
engine: engine,
options: options,
destroy: destroy,
);