Class InMemoryDecryptionServer

    • Constructor Detail

      • InMemoryDecryptionServer

        public InMemoryDecryptionServer​()
    • Method Detail

      • getCipherVersions

        public List<CipherVersion> getCipherVersions​(String aNamespace,
                                                     String aMessage,
                                                     String aSignature)
        Returns the currently available cipher versions. An implementation might just make use of an 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. -------------------------------------------------------------------------
        Specified by:
        getCipherVersions in interface DecryptionServer
        Parameters:
        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.
        Returns:
        A list as with the currently known cipher versions. The ciphers contained therein might be encrypted!
      • addCipherVersion

        protected void addCipherVersion​(String aNamespace,
                                        CipherVersion aCipherVersion)
                                 throws CipherUidAlreadyInUseException
        Adds a cipher version to the server. Bad hack for testing purposes.
        Parameters:
        aNamespace - The namespace for which to add the cipher
        aCipherVersion - The cipher version with cipher UID and cipher.
        Throws:
        CipherUidAlreadyInUseException - in case the given cipher UID has already been used.