DidiSoft OpenPGP Library for .NET till now offered only a file-based mass key storage and temporary in-memory located one.
In the latest version 188.8.131.52 has been implemented extended support for a custom key storage location. An example of such storage of the keys is a BLOB field in a database. In addition, this version of the library also exposes three events fired when a key located in the KeyStore class is modified
Custom key storage
In order to create a custom storage mechanism, we have to implement an interface DidiSoft.Pgp.Storage.IKeyStorage.
Check here for an example that illustrates how to implement an MS SQL Server based key storage.
Key modification events
The new key modification events are fired each time a new key is inserted into the KeyStore, updated or deleted. These events are useful when we want to implement a key synchronization logic between our KeyStore class and some other location where the keys shall reside.
For more information, please check the dedicated paragraph for the key modification events.