Interface IKeyStore
The interface to store ProtectedPrivateKeys. An appropriate implementation should be used according to a running platform.
Namespace: Libplanet.KeyStore
Assembly: Libplanet.dll
Syntax
public interface IKeyStore
Methods
| Improve this Doc View SourceAdd(ProtectedPrivateKey)
Adds a new key
into the key store.
Declaration
Guid Add(ProtectedPrivateKey key)
Parameters
Type | Name | Description |
---|---|---|
ProtectedPrivateKey | key | A key to add. |
Returns
Type | Description |
---|---|
Guid | The id of the added |
Get(Guid)
Looks for a key having the requested id
in the key store.
Declaration
ProtectedPrivateKey Get(Guid id)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | The key ID to look for. |
Returns
Type | Description |
---|---|
ProtectedPrivateKey | The found key. |
Exceptions
Type | Condition |
---|---|
NoKeyException | Thrown when there are no key of the given
|
List()
Lists all keys in the key store.
Declaration
IEnumerable<Tuple<Guid, ProtectedPrivateKey>> List()
Returns
Type | Description |
---|---|
IEnumerable<Tuple<Guid, ProtectedPrivateKey>> | All keys in the key store. The order is undefined and not deterministic. |
ListIds()
Lists all keys IDs in the key store.
Declaration
IEnumerable<Guid> ListIds()
Returns
Type | Description |
---|---|
IEnumerable<Guid> | All keys IDs in the key store. The order is undefined and not deterministic. |
Remove(Guid)
Removes a key having the given
Declaration
void Remove(Guid id)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | The key ID to remove. |
Exceptions
Type | Condition |
---|---|
NoKeyException | Thrown when there is no key having
the given |