Show / Hide Table of Contents

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 Source

Add(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 key.

| Improve this Doc View Source

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 id.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

Remove(Guid)

Removes a key having the given from the key store.

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 id.

  • Improve this Doc
  • View Source
Back to top Copyright © 2019–2020 Planetarium