DecryptionServer
public class InMemoryDecryptionServer extends Object implements DecryptionServer
InMemoryDecryptionServer
is a non-persisting implementation of
the DecryptionServer
managing the CipherVersion
instances in
memory only. This implementation provides means to easily set up a quick and
dirty test setup. The InMemoryDecryptionServer
is the counterpart of
the InMemoryEncryptionServer
which both work (not doing any
persistence) hand in hand.Constructor | Description |
---|---|
InMemoryDecryptionServer() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
addCipherVersion(String aNamespace,
CipherVersion aCipherVersion) |
Adds a cipher version to the server.
|
List<CipherVersion> |
getCipherVersions(String aNamespace,
String aMessage,
String aSignature) |
Returns the currently available cipher versions.
|
public List<CipherVersion> getCipherVersions(String aNamespace, String aMessage, String aSignature)
ObjectOutputStream
. Though the stream is
encrypted with the public key of the message signer.
-------------------------------------------------------------------------
Another approach might not return a stream, it might return a list
containing the cipher versions with the ciphers being encrypted by the
public key. Or a stream is returned which is not encrypted but the
ciphers in the cipher versions carried by the stream.
-------------------------------------------------------------------------getCipherVersions
in interface DecryptionServer
aNamespace
- The namespace for which to get the cipher versions.aMessage
- A message to be signed by the requester of the cipher
version.aSignature
- The signature of the requester so that the according
public key for encryption can be determined and the origin can be
verified.protected void addCipherVersion(String aNamespace, CipherVersion aCipherVersion) throws CipherUidAlreadyInUseException
aNamespace
- The namespace for which to add the cipheraCipherVersion
- The cipher version with cipher UID and cipher.CipherUidAlreadyInUseException
- in case the given cipher UID has
already been used.Copyright © 2021. All rights reserved.