use of com.wultra.security.powerauth.client.v3.GetEciesDecryptorResponse in project powerauth-restful-integration by lime-company.
the class PowerAuthEncryptionProvider method getEciesDecryptorParameters.
@Override
@Nonnull
public PowerAuthEciesDecryptorParameters getEciesDecryptorParameters(@Nullable String activationId, @Nonnull String applicationKey, @Nonnull String ephemeralPublicKey) throws PowerAuthEncryptionException {
try {
GetEciesDecryptorRequest eciesDecryptorRequest = new GetEciesDecryptorRequest();
eciesDecryptorRequest.setActivationId(activationId);
eciesDecryptorRequest.setApplicationKey(applicationKey);
eciesDecryptorRequest.setEphemeralPublicKey(ephemeralPublicKey);
GetEciesDecryptorResponse eciesDecryptorResponse = powerAuthClient.getEciesDecryptor(eciesDecryptorRequest);
return new PowerAuthEciesDecryptorParameters(eciesDecryptorResponse.getSecretKey(), eciesDecryptorResponse.getSharedInfo2());
} catch (Exception ex) {
logger.warn("Get ECIES decryptor call failed, error: {}", ex.getMessage());
logger.debug(ex.getMessage(), ex);
throw new PowerAuthEncryptionException();
}
}
Aggregations