Skip to content

Latest commit

 

History

History
20 lines (11 loc) · 1.46 KB

README.md

File metadata and controls

20 lines (11 loc) · 1.46 KB

ApplePayUtils

alt textLanguage grade: JavaTotal alertscodecov

This is the java util to decrypt apple payload data from iOS.

Usage

With the ephemralKeyString and the encrypted data from ios app response json, these following static methods in AppleUtils.java can be used to decrypt encrypted data as byte[], decrypted JSON String or parse as any object from decrypted JSON:

byte[] decryptAsBytes(String ephemeralKeyString, String privateKeyString, String certificateString, String data);

String decryptAsString(String ephemeralKeyString, String privateKeyString, String certificateString, String data);

T decryptAsObjectFromJSON(Class<T> clazz, String ephemeralKeyString, String privateKeyString, String certificateString, String data);

See ApplePayUtilsTest.java

For iOS app

See Apple Pay Demo