Class EncryptorFactory
java.lang.Object
io.getlime.security.powerauth.rest.api.spring.encryption.EncryptorFactory
@Component public class EncryptorFactory extends Object
Class responsible for building encryptors.
- Author:
- Petr Dvorak, petr@wultra.com
-
Constructor Summary
Constructors Constructor Description EncryptorFactory()Default constructor. -
Method Summary
Modifier and Type Method Description PowerAuthNonPersonalizedEncryptorbuildNonPersonalizedEncryptor(io.getlime.core.rest.model.base.request.ObjectRequest<NonPersonalizedEncryptedPayloadModel> object)Return a new instance of a non-personalized encryptor.PowerAuthNonPersonalizedEncryptorbuildNonPersonalizedEncryptor(String applicationKeyBase64, String sessionIndexBase64, String ephemeralPublicKeyBase64)Return a new instance of a non-personalized encryptor.voidsetPowerAuthClient(com.wultra.security.powerauth.client.PowerAuthClient powerAuthClient)Set PowerAuth client via the setter injection.
-
Constructor Details
-
EncryptorFactory
public EncryptorFactory()Default constructor.
-
-
Method Details
-
setPowerAuthClient
@Autowired public void setPowerAuthClient(com.wultra.security.powerauth.client.PowerAuthClient powerAuthClient)Set PowerAuth client via the setter injection.- Parameters:
powerAuthClient- PowerAuth client.
-
buildNonPersonalizedEncryptor
public PowerAuthNonPersonalizedEncryptor buildNonPersonalizedEncryptor(io.getlime.core.rest.model.base.request.ObjectRequest<NonPersonalizedEncryptedPayloadModel> object) throws PowerAuthEncryptionExceptionReturn a new instance of a non-personalized encryptor.- Parameters:
object- Request object to be used to initialize a new encryptor.- Returns:
- New instance of a non-personalized encryptor.
- Throws:
PowerAuthEncryptionException- Thrown in case encryptor could not be built.
-
buildNonPersonalizedEncryptor
public PowerAuthNonPersonalizedEncryptor buildNonPersonalizedEncryptor(String applicationKeyBase64, String sessionIndexBase64, String ephemeralPublicKeyBase64) throws PowerAuthEncryptionExceptionReturn a new instance of a non-personalized encryptor.- Parameters:
applicationKeyBase64- Application key associated with an application master key used for encryption.sessionIndexBase64- Session index.ephemeralPublicKeyBase64- Ephemeral public key.- Returns:
- New instance of a non-personalized encryptor.
- Throws:
PowerAuthEncryptionException- Thrown in case encryptor could not be built.
-