@ApiAudience.Public @ApiStability.Unstable public class InMemoryKeyStore extends java.lang.Object implements KeyStore
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,EncryptedPrivateKey> |
hashedAuth2Encrypted |
protected org.slf4j.Logger |
logger |
protected java.util.Set<Identity> |
storedIdentities |
Constructor and Description |
---|
InMemoryKeyStore() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
digest(Authentication authentication) |
EncryptedPrivateKey |
export(Authentication authentication,
java.lang.String password)
Export an private key encrypted.
|
java.util.List<Identity> |
listIdentities()
Get all the stored identities.
|
Signer |
load(Authentication authentication)
Load signer with
authentication . |
void |
remove(Authentication authentication)
Remove an
AergoKey corresponding to authentication . |
void |
save(Authentication authentication,
AergoKey key)
Store an
AergoKey to the keystore. |
void |
store(java.lang.String path,
char[] password)
Store keystore to the
path with password . |
protected final transient org.slf4j.Logger logger
protected final java.util.Set<Identity> storedIdentities
protected final java.util.Map<java.lang.String,EncryptedPrivateKey> hashedAuth2Encrypted
public void save(Authentication authentication, AergoKey key)
KeyStore
AergoKey
to the keystore.public Signer load(Authentication authentication)
KeyStore
authentication
.public void remove(Authentication authentication)
KeyStore
AergoKey
corresponding to authentication
.public EncryptedPrivateKey export(Authentication authentication, java.lang.String password)
KeyStore
public java.util.List<Identity> listIdentities()
KeyStore
listIdentities
in interface KeyStore
public void store(java.lang.String path, char[] password)
KeyStore
path
with password
.protected java.lang.String digest(Authentication authentication)