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.256-beta+0e7e94d39a9b10efe7e26e3b8d5130afc0dd4d74
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