public class SealCalculator
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
calculate(java.lang.String sealString,
java.lang.String key)
Calculate the encrypted seal for a
PaymentRequest based on a given seal string. |
static java.lang.String |
getSealString(InitializationResponse initializationResponse)
Sort & concatenate the fields of a given
PaymentRequest, needed to correctly verify a response. |
static java.lang.String |
getSealString(PaymentRequest paymentRequest)
Sort & concatenate the fields of a given
PaymentRequest, needed to correctly sign the request. |
public static java.lang.String calculate(java.lang.String sealString,
java.lang.String key)
throws SealCalculationException
PaymentRequest based on a given seal string.sealString - the seal string for the PaymentRequest that needs to be signedkey - the merchant's secret keySealCalculationException - when the encryption fails (e.g. algorithm missing, invalid key specified)getSealString(PaymentRequest)public static java.lang.String getSealString(PaymentRequest paymentRequest)
PaymentRequest, needed to correctly sign the request.paymentRequest - the request that's needs to be signedpublic static java.lang.String getSealString(InitializationResponse initializationResponse)
PaymentRequest, needed to correctly verify a response.initializationResponse - the response that's needs to be verified