public class PublicKeyDecryptionServiceImpl extends AbstractDecryptionService
DecryptionService
retrieves CipherVersion
instances from
the DecryptionServer
and is decrypting the ciphers contained in the
CipherVersion
instances with a private key.Constructor and Description |
---|
PublicKeyDecryptionServiceImpl(String aNamespace,
String aPrivateKeyPath,
DecryptionServer aDecryptionServer)
Constructs the service with the required services and configuration.
|
PublicKeyDecryptionServiceImpl(String aNamespace,
String aPrivateKeyPath,
DecryptionServer aDecryptionServer,
CipherVersionFactory<CipherVersion> aCipherVersionFactory)
Constructs the service with the required services and configuration.
|
PublicKeyDecryptionServiceImpl(String aNamespace,
String aPrivateKeyPath,
String aPrivateKeyPassPhrase,
DecryptionServer aDecryptionServer)
Constructs the service with the required services and configuration.
|
PublicKeyDecryptionServiceImpl(String aNamespace,
String aPrivateKeyPath,
String aPrivateKeyPassPhrase,
DecryptionServer aDecryptionServer,
CipherVersionFactory<CipherVersion> aCipherVersionFactory)
Constructs the service with the required services and configuration.
|
Modifier and Type | Method and Description |
---|---|
protected String |
createMessage()
Creates a message for which a signature is to be created in order to
authenticate for the retrieval of the cipher versions.
|
protected <CV extends CipherVersion> |
toDecryptedCipherVersion(CV aEncyrptedCipherVersion)
Hook factory method to be implemented by subclasses.
|
protected String |
toSignature(String aMessage)
Creates a signature for the given message.
|
getCipherVersions, setCipherVersionsExpireTimeInMs
public PublicKeyDecryptionServiceImpl(String aNamespace, String aPrivateKeyPath, DecryptionServer aDecryptionServer, CipherVersionFactory<CipherVersion> aCipherVersionFactory) throws edu.vt.middleware.crypt.CryptException, IOException
aPrivateKeyPath
- The path on the file system to the private key to
be used for decrypting any ciphers passed by the decryption server
in CipherVersions retrieved from a storage.aDecryptionServer
- The decryption server for accessing the cipher
versionsaCipherVersionFactory
- The factory to be used for creating
CipherVersion
instances.IOException
- in case of I/O problemsedu.vt.middleware.crypt.CryptException
- in case the cryptography algorithm had problems.public PublicKeyDecryptionServiceImpl(String aNamespace, String aPrivateKeyPath, DecryptionServer aDecryptionServer) throws edu.vt.middleware.crypt.CryptException, IOException
aPrivateKeyPath
- The path on the file system to the private key to
be used for decrypting any ciphers passed by the decryption server
in CipherVersions retrieved from a storage.aDecryptionServer
- The decryption server for accessing the cipher
versionsIOException
- in case of I/O problemsedu.vt.middleware.crypt.CryptException
- in case the cryptography algorithm had problems.public PublicKeyDecryptionServiceImpl(String aNamespace, String aPrivateKeyPath, String aPrivateKeyPassPhrase, DecryptionServer aDecryptionServer) throws edu.vt.middleware.crypt.CryptException, IOException
aPrivateKeyPath
- The path on the file system to the private key to
be used for decrypting any ciphers passed by the decryption server
in CipherVersions retrieved from a storage.aPrivateKeyPassPhrase
- The pass phrase for decrypting the private
key.aDecryptionServer
- The decryption server for accessing the cipher
versionsIOException
- in case of I/O problemsedu.vt.middleware.crypt.CryptException
- in case the cryptography algorithm had problems.public PublicKeyDecryptionServiceImpl(String aNamespace, String aPrivateKeyPath, String aPrivateKeyPassPhrase, DecryptionServer aDecryptionServer, CipherVersionFactory<CipherVersion> aCipherVersionFactory) throws edu.vt.middleware.crypt.CryptException, IOException
aPrivateKeyPath
- The path on the file system to the private key to
be used for decrypting any ciphers passed by the decryption server
in CipherVersions retrieved from a storage.aPrivateKeyPassPhrase
- The pass phrase for decrypting the private
key.aDecryptionServer
- The decryption server for accessing the cipher
versionsaCipherVersionFactory
- The factory to be used for creating
CipherVersion
instances.IOException
- in case of I/O problemsedu.vt.middleware.crypt.CryptException
- in case the cryptography algorithm had problems.protected String toSignature(String aMessage)
AbstractDecryptionService
toSignature
in class AbstractDecryptionService
aMessage
- The message for which a signature is to be generatedprotected String createMessage()
AbstractDecryptionService
createMessage
in class AbstractDecryptionService
protected <CV extends CipherVersion> CV toDecryptedCipherVersion(CV aEncyrptedCipherVersion)
AbstractDecryptionService
toDecryptedCipherVersion
in class AbstractDecryptionService
CV
- The type of the CipherVersion
to be used.aEncyrptedCipherVersion
- The CipherVersion
to be decrypted.CipherVersion
.Copyright © 2016. All rights reserved.