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 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<io.getlime.security.powerauth.rest.api.model.entity.NonPersonalizedEncryptedPayloadModel> object) throws PowerAuthEncryptionException
      Return 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 PowerAuthEncryptionException
      Return 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.