|
CipherFlushCache Method
|
Blocks current thread and waits for any pending save of local system key cache to complete.
Namespace: GSF.Security.CryptographyAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.207-beta+1781b796b2aa7a54013a031eb432fe4ccee31867
Syntax public static void FlushCache(
int millisecondsTimeout = -1
)
Public Shared Sub FlushCache (
Optional millisecondsTimeout As Integer = -1
)
public:
static void FlushCache(
int millisecondsTimeout = -1
)
static member FlushCache :
?millisecondsTimeout : int
(* Defaults:
let _millisecondsTimeout = defaultArg millisecondsTimeout -1
*)
-> unit
GSF.Security.Cryptography.Cipher.FlushCache = function(millisecondsTimeout);
View SourceParameters
- 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