public class InMemoryDecryptionServerImpl extends Object implements DecryptionServer
InMemoryDecryptionServerImpl
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 InMemoryDecryptionServerImpl
is the
counterpart of the InMemoryEncryptionServerImpl
which both work (not
doing any persistence) hand in hand.Constructor and Description |
---|
InMemoryDecryptionServerImpl() |
Modifier and Type | Method and 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)
DecryptionServer
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 CipherVersion
to be added.aCipherVersion
- The cipher version with cipher UID and cipher.CipherUidAlreadyInUseException
- in case the given cipher UID has
already been used.Copyright © 2016. All rights reserved.