Class ServerEncryptorSecrets

java.lang.Object
io.getlime.security.powerauth.crypto.lib.encryptor.model.v3.ServerEncryptorSecrets
All Implemented Interfaces:
EncryptorSecrets

public class ServerEncryptorSecrets extends Object implements EncryptorSecrets
The ServerEncryptorSecrets class provides secret values for server side encryptor using ECIES scheme.

PowerAuth protocol versions:

  • 3.0
  • 3.1
  • 3.2
  • Constructor Details

    • ServerEncryptorSecrets

      public ServerEncryptorSecrets(PrivateKey serverPrivateKey, String applicationSecret, byte[] transportKey)
      Construct encryptor secrets for an activation scoped encryptor. In this variant, the SharedInfo2 base is not known in advance and will be calculated in the encryptor.
      Parameters:
      serverPrivateKey - Server's private key.
      applicationSecret - Application's secret.
      transportKey - Transport key. The value is required for activation scoped encryptor. If null is provided, then such secrets can be used for application scoped encryptor only.
    • ServerEncryptorSecrets

      public ServerEncryptorSecrets(PrivateKey serverPrivateKey, String applicationSecret)
      Construct encryptor secrets for an application scoped encryptor. In this variant, the SharedInfo2 base is not known in advance and will be calculated in the encryptor.
      Parameters:
      serverPrivateKey - Server's private key.
      applicationSecret - Application's secret.
    • ServerEncryptorSecrets

      public ServerEncryptorSecrets(byte[] envelopeKey, byte[] sharedInfo2Base)
      Construct encryptor secrets with precalculated envelope key and SharedInfo2 base. This type of configuration is useful for situations when such values are obtained from elsewhere. For example, our RESTful integration library doesn't know server's private key, but can get such precomputed secrets from the PowerAuth Server.
      Parameters:
      envelopeKey - Precalculated envelope key.
      sharedInfo2Base - Precalculated SharedInfo2 base.