public final class Cards
extends java.lang.Object
This file is open source and available under the MIT license. See the LICENSE file for more info.
Created by timon on 25/01/2018.
Modifier and Type | Field and Description |
---|---|
static CardEncryptor |
ENCRYPTOR |
static CardFormatter |
FORMATTER |
static CardValidator |
VALIDATOR |
Modifier and Type | Method and Description |
---|---|
static java.util.concurrent.Callable<EncryptedCard> |
fetchPublicKeyAndEncrypt(Application application,
HostProvider hostProvider,
java.lang.String publicKeyToken,
Card card,
java.util.Date generationTime)
Fetches a public key and encrypts a
Card to an EncryptedCard . |
static java.util.concurrent.Callable<java.lang.String> |
fetchPublicKeyAndEncryptToToken(Application application,
HostProvider hostProvider,
java.lang.String holderName,
java.lang.String publicKeyToken,
Card card,
java.util.Date generationTime)
Fetches a public key and encrypts a
Card to a token. |
public static final CardFormatter FORMATTER
public static final CardValidator VALIDATOR
public static final CardEncryptor ENCRYPTOR
public static java.util.concurrent.Callable<EncryptedCard> fetchPublicKeyAndEncrypt(Application application, HostProvider hostProvider, java.lang.String publicKeyToken, Card card, java.util.Date generationTime)
Card
to an EncryptedCard
.application
- The current Application
.hostProvider
- The HostProvider
indicating the environment to connect to.publicKeyToken
- The public key token to retrieve the public key with.card
- The Card
to be encrypted.generationTime
- The generation Date
of the Card
.Callable
that returns the EncryptedCard
.CardApi.getPublicKey(String)
,
CardEncryptor.encryptFields(Card, Date, String)
public static java.util.concurrent.Callable<java.lang.String> fetchPublicKeyAndEncryptToToken(Application application, HostProvider hostProvider, java.lang.String holderName, java.lang.String publicKeyToken, Card card, java.util.Date generationTime)
Card
to a token.application
- The current Application
.hostProvider
- The HostProvider
indicating the environment to connect to.holderName
- The name of the card holder.publicKeyToken
- The public key token to retrieve the public key with.card
- The Card
to be encrypted.generationTime
- The generation Date
of the Card
.Callable
that returns a token representing the encrypted Card
.CardApi.getPublicKey(String)
,
CardEncryptor.encrypt(String, Card, Date, String)