java.lang.Object
io.getlime.security.powerauth.rest.api.spring.encryption.EncryptorFactory

@Component
public class EncryptorFactory
extends java.lang.Object
Class responsible for building encryptors.
Author:
Petr Dvorak, petr@wultra.com
  • Constructor Summary

    Constructors
    Constructor Description
    EncryptorFactory()  
  • Method Summary

    Modifier and Type Method Description
    PowerAuthNonPersonalizedEncryptor buildNonPersonalizedEncryptor​(io.getlime.core.rest.model.base.request.ObjectRequest<io.getlime.security.powerauth.rest.api.model.entity.NonPersonalizedEncryptedPayloadModel> object)
    Return a new instance of a non-personalized encryptor.
    PowerAuthNonPersonalizedEncryptor buildNonPersonalizedEncryptor​(java.lang.String applicationKeyBase64, java.lang.String sessionIndexBase64, java.lang.String ephemeralPublicKeyBase64)
    Return a new instance of a non-personalized encryptor.
    void setPowerAuthClient​(com.wultra.security.powerauth.client.PowerAuthClient powerAuthClient)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EncryptorFactory

      public EncryptorFactory()
  • Method Details

    • setPowerAuthClient

      @Autowired public void setPowerAuthClient​(com.wultra.security.powerauth.client.PowerAuthClient powerAuthClient)
    • 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​(java.lang.String applicationKeyBase64, java.lang.String sessionIndexBase64, java.lang.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.