Пример #1
0
        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();
            }
        }
Пример #2
0
 public string GenerateServerAck()
 {
     Step = HandshakeResourceType.ClientAck;
     return(_serverAck == null ? _serverAck = _spcApi.GenerateServerAck() : _serverAck);
 }