/// <summary> /// Disposes object /// </summary> /// <param name="disposing">Flag indicating whether managed resources should be disposed</param> protected virtual void Dispose(bool disposing) { if (!this._disposed) { if (disposing) { // Dispose managed objects if (_params40 != null) { _params40.Dispose(); _params40 = null; } if (_params41 != null) { _params41.Dispose(); _params41 = null; } if (_params80 != null) { _params80.Dispose(); _params80 = null; } if (_params81 != null) { _params81.Dispose(); _params81 = null; } } // Dispose unmanaged objects _disposed = true; } }
/// <summary> /// Initializes a new instance of the CkSsl3MasterKeyDeriveParams class. /// </summary> /// <param name='randomInfo'>Client's and server's random data information</param> /// <param name='dh'>Set to false for CKM_SSL3_MASTER_KEY_DERIVE mechanism and to true for CKM_SSL3_MASTER_KEY_DERIVE_DH mechanism</param> public CkSsl3MasterKeyDeriveParams(CkSsl3RandomData randomInfo, bool dh) { if (randomInfo == null) throw new ArgumentNullException("randomInfo"); // Keep reference to randomInfo so GC will not free it while this object exists _randomInfo = randomInfo; if (Platform.UnmanagedLongSize == 4) { if (Platform.StructPackingSize == 0) _params40 = new HighLevelAPI40.MechanismParams.CkSsl3MasterKeyDeriveParams(_randomInfo._params40, dh); else _params41 = new HighLevelAPI41.MechanismParams.CkSsl3MasterKeyDeriveParams(_randomInfo._params41, dh); } else { if (Platform.StructPackingSize == 0) _params80 = new HighLevelAPI80.MechanismParams.CkSsl3MasterKeyDeriveParams(_randomInfo._params80, dh); else _params81 = new HighLevelAPI81.MechanismParams.CkSsl3MasterKeyDeriveParams(_randomInfo._params81, dh); } }
/// <summary> /// Disposes object /// </summary> /// <param name="disposing">Flag indicating whether managed resources should be disposed</param> protected virtual void Dispose(bool disposing) { if (!this._disposed) { if (disposing) { // Dispose managed objects if (_params40 != null) { _params40.Dispose(); _params40 = null; } if (_params41 != null) { _params41.Dispose(); _params41 = null; } if (_params80 != null) { _params80.Dispose(); _params80 = null; } if (_params81 != null) { _params81.Dispose(); _params81 = null; } } // Dispose unmanaged objects _disposed = true; } }