create static method

Future<NoiseSecurity> create(
  1. KeyPair identityKey
)

Creates a new NoiseXXProtocol instance

Implementation

static Future<NoiseSecurity> create(keys.KeyPair identityKey) async {
  // Verify Ed25519 compatibility
  final pubKey = identityKey.publicKey;
  if (pubKey.type != crypto_pb.KeyType.Ed25519) { // Changed keyType to type
    throw NoiseProtocolException('Identity key must be Ed25519 compatible (got ${pubKey.type})');
  }
  return NoiseSecurity._(identityKey);
}