com.r3corda.node.services.keys / E2ETestKeyManagementService

# E2ETestKeyManagementService

`class E2ETestKeyManagementService : SingletonSerializeAsToken, KeyManagementService`

A simple in-memory KMS that doesnt bother saving keys to disk. A real implementation would:

- Probably be accessed via the network layer as an internal node service i.e. via a message queue, so it can run on a separate/firewalled service.

- Use the protocol framework so requests to fetch keys can be suspended whilst a human signs off on the request.

- Use deterministic key derivation.

- Possibly have some sort of TREZOR-like two-factor authentication ability.

etc.

### Constructors

<init> | `E2ETestKeyManagementService(initialKeys: Set<KeyPair>)` A simple in-memory KMS that doesnt bother saving keys to disk. A real implementation would:

### Properties

keys | `val keys: Map<PublicKey, PrivateKey>` Returns a snapshot of the current pubkey->privkey mapping.

### Functions

freshKey | `fun freshKey(): KeyPair` Generates a new random key and adds it to the exposed map.

### Inherited Functions

toKeyPair | `open fun toKeyPair(publicKey: PublicKey): KeyPair`
toPrivate | `open fun toPrivate(publicKey: PublicKey): PrivateKey`
toToken | `open fun toToken(context: SerializeAsTokenContext): SerializationToken`