public class PersistentKeyManagementService extends SingletonSerializeAsToken implements KeyManagementService
A persistent re-implementation of class E2ETestKeyManagementService
to support node re-start.
This is not the long-term implementation. See the list of items in the above class.
This class needs database transactions to be in-flight during method calls and init.
class E2ETestKeyManagementService
KeyManagementService.DefaultImpls
Constructor and Description |
---|
PersistentKeyManagementService(java.util.Set<java.security.KeyPair> initialKeys)
A persistent re-implementation of
class E2ETestKeyManagementService to support node re-start. |
Modifier and Type | Method and Description |
---|---|
java.security.KeyPair |
freshKey()
Generates a new random key and adds it to the exposed map.
|
java.util.Map<java.security.PublicKey,java.security.PrivateKey> |
getKeys()
Returns a snapshot of the current pubkey->privkey mapping.
|
java.security.KeyPair |
toKeyPair(java.security.PublicKey publicKey) |
java.security.KeyPair |
toKeyPair(java.lang.Iterable<? extends java.security.PublicKey> publicKeys)
Returns the first KeyPair matching any of the publicKeys
|
java.security.PrivateKey |
toPrivate(java.security.PublicKey publicKey) |
toToken
freshKey, getKeys, toKeyPair, toKeyPair, toPrivate
toToken
public PersistentKeyManagementService(java.util.Set<java.security.KeyPair> initialKeys)
A persistent re-implementation of class E2ETestKeyManagementService
to support node re-start.
This is not the long-term implementation. See the list of items in the above class.
This class needs database transactions to be in-flight during method calls and init.
class E2ETestKeyManagementService
public java.util.Map<java.security.PublicKey,java.security.PrivateKey> getKeys()
Returns a snapshot of the current pubkey->privkey mapping.
public java.security.KeyPair freshKey()
Generates a new random key and adds it to the exposed map.
public java.security.PrivateKey toPrivate(java.security.PublicKey publicKey)
public java.security.KeyPair toKeyPair(java.security.PublicKey publicKey)