CipherFlushCache Method

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

Definition

Namespace: Gemstone.Security.Cryptography
Assembly: Gemstone.Security (in Gemstone.Security.dll) Version: 1.0.128 -- Release Build+bd1c1867941d4700e644c1451bb1298b1b27c8bc
public static void FlushCache(
	int millisecondsTimeout = -1
)

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 rarely be 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