private void Decrypt() { if (_zData == null) { // do asymmetric decryption 1st, if required if (_xData == null) { var yAlg = SysProps.GetValue(SysPropName.YAlg, 0); var yrki = SysProps.GetValue <string>(SysPropName.YRKI, null); if ((yAlg > 0) && (yrki != null)) { _xData = _cryptoManager.DecryptWithSecretKey(yrki, YData); } else { _xData = YData; } //_YData = null; } // now do symmetric decryption 2nd, if required var xAlg = SysProps.GetValue(SysPropName.XAlg, 0); var xtki = SysProps.GetValue <string>(SysPropName.XTKI, null); if ((xAlg > 0) && (xtki != null)) { _zData = _cryptoManager.DecryptWithTranspKey(xtki, _xData); } else { _zData = _xData; } _xData = null; } }