SpringCard AppleVAS .NET  19.06
Terminal-side implementation of Apple Pass Kit NFC
SpringCard.AppleVas.AppleVasConfig Class Reference

Encapsulate the Apple VAS Merchant's data: its Merchant ID and its Private key(s) More...

Public Member Functions

 AppleVasConfig (string Name)
 Create a new Merchant object for the given Merchant name (Merchant ID = SHA256 of Merchant name). The Private Key will be provided later on.
 
 AppleVasConfig (string Name, byte[] encodedPrivateKey)
 Create a new Merchant object for the given Merchant name (Merchant ID = SHA256 of Merchant name). Specify the Merchant's Private Key right now.
 
 AppleVasConfig (string Name, byte[] encodedPrivateKey, out byte[] encodedPublicKey)
 Create a new Merchant object for the given Merchant name (Merchant ID = SHA256 of Merchant name) Specify the Merchant's Private Key right now (and retrieve the corresponding Public Key).
 
 AppleVasConfig (byte[] Id)
 Create a new Merchant object for the given Merchant ID The Private Key will be provided later on.
 
 AppleVasConfig (byte[] Id, byte[] encodedPrivateKey)
 Create a new Merchant object for the given Merchant ID Specify the Merchant's Private Key right now.
 
 AppleVasConfig (byte[] Id, byte[] encodedPrivateKey, out byte[] encodedPublicKey)
 Create a new Merchant object for the given Merchant ID Specify the Merchant's Private Key right now (and retrieve the corresponding Public Key).
 
void ClearPrivateKeys ()
 Reset the Merchant's keyset.
 
bool AddPrivateKey (byte[] encodedPrivateKey)
 Add a new private key to the Merchant's keyset. The function returns false if the private key is invalid.
 
bool AddPrivateKey (byte[] encodedPrivateKey, out byte[] encodedPublicKey)
 Add a new private key to the Merchant's keyset (and retrieve the corresponding Public Key). The function returns false if the private key is invalid.
 

Static Public Member Functions

static byte [] ComputeId (string Name)
 Compute a Merchant ID from a Merchant name (this is the SHA256 function)
 
static bool ValidatePrivateKey (byte[] encodedPrivateKey)
 Verify that a private key is valid.
 
static bool ValidatePrivateKey (byte[] encodedPrivateKey, out uint keyId)
 Verify that a private key is valid, and return its ID.
 
static bool ValidatePrivateKey (byte[] encodedPrivateKey, out uint keyId, out byte[] encodedPublicKey)
 Verify that a private key is valid, and return its ID and associated public key.
 
static AppleVasConfig LoadFromJson (JSONObject jsonData)
 Import a merchant configuration form a JSON object.
 
static byte [] EncodePublicKeyPem (byte[] buffer)
 Export a public key in PEM format.
 

Public Attributes

string Url
 The Merchant URL.
 

Properties

byte [] Id [get]
 The Merchant ID.
 
uint [] PrivateKeyIds [get]
 List the IDs of the private keys that have been added.
 

Detailed Description

Encapsulate the Apple VAS Merchant's data: its Merchant ID and its Private key(s)


The documentation for this class was generated from the following file: