public PinAuthData(string authType, string pin, SPCApiBridge spcApi) { AuthType = authType; string serverHello = spcApi.GenerateServerHello(pin); Pin = serverHello; }
public void Initialize(string userId) { if (this.wrapped != null) { this.wrapped.Dispose(); } this.wrapped = new SPCApiBridge(userId); }
public AckAuthData(string authType, string pin, string data, SPCApiBridge spiApi) { var regexPattern = "[{\\\"\\w:]GeneratorClientHello[\\\\\\\":]*([\\d\\w]*)"; var requestData = Regex.Match(data, regexPattern).Groups[1].Value; var regexRequestPattern = "[{\\\"\\w:]request_id[\\\\\\\":]*([\\d\\w]*)"; var requestId = Regex.Match(data, regexRequestPattern).Groups[1].Value; AuthType = authType; var parsed = spiApi.ParseClientHello(pin, requestData); if (parsed) { RequestId = requestId; Ack = spiApi.GenerateServerAck(); } }
public PairingSession(string id) { Id = id; _spcApi = new SPCApiBridge("654321"); }