Click or drag to resize

CipherFlushCache Method

Blocks current thread and waits for any pending save of local system key cache to complete.

Namespace: GSF.Security.Cryptography
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.205-beta+5ef4169f3b1079d8b163dd363614f656bd140924
Syntax
public static void FlushCache(
	int millisecondsTimeout = -1
)
View Source

Parameters

millisecondsTimeout  Int32  (Optional)
The number of milliseconds to wait, or Infinite(-1) to wait indefinitely.
Remarks

This method only needs to be used if crypto cache changes could be pending during application shutdown (i.e., executing ciphers with new keys that have not been saved, using existing keys does not queue crypto cache updates) to ensure keys are flushed before exit.

For most applications it is expected that this method would be rarely needed. However, possible usage scenarios would include:

  • Writing an application that establishes crypto keys where application lifetime would be very short (i.e., run, create keys, exit).
  • Creating new crypto keys during application shutdown (i.e., performing ciphers with non-existing keys at shutdown).

See Also