Пример #1
0
 // mutable props
 private void Authenticate()
 {
     if (_ySignedState == 0)
     {
         var yAlg = SysProps.GetValue(SysPropName.YAlg, 0);
         var yski = SysProps.GetValue <string>(SysPropName.YSKI, null);
         if ((yAlg > 0) && (yski != null))
         {
             if (_cryptoManager.VerifySignature(yski, YData, YSign))
             {
                 _ySignedState = 1; // success
             }
         }
         else
         {
             // cannot authenticate
             _ySignedState = -1;
         }
     }
 }