@ThreadSafe class E2ETestKeyManagementService : SingletonSerializeAsToken, KeyManagementService
A simple in-memory KMS that doesn't bother saving keys to disk. A real implementation would:
etc.
<init> |
E2ETestKeyManagementService(initialKeys: Set<KeyPair>)
A simple in-memory KMS that doesn't bother saving keys to disk. A real implementation would: |
keys |
val keys: Map<PublicKey, PrivateKey>
Returns a snapshot of the current pubkey->privkey mapping. |
freshKey |
fun freshKey(): KeyPair
Generates a new random key and adds it to the exposed map. |
toKeyPair |
open fun toKeyPair(publicKey: PublicKey): KeyPair open fun toKeyPair(publicKeys: Iterable<PublicKey>): KeyPair
Returns the first KeyPair matching any of the publicKeys |
toPrivate |
open fun toPrivate(publicKey: PublicKey): PrivateKey |
toToken |
open fun toToken(context: SerializeAsTokenContext): SerializationToken |