Use the getSignatureKey method to generate a signature
importsmile.identity.core.Signature;/* You have two options for generating a signature: You can provide a timestamp string or we will generate a signature using the current time as the timestamp.*/// calling method without providing timestampSignature signature =newSignature(partnerId, apiKey);SignatureKey key =signature.getSignatureKey();String timestamp =key.getTimestamp();String signature =key.getSignature();// you can print the timestamp used in calculating your signature// providing your own timestampSignature signature =newSignature(partnerId, apiKey);String isoTimestamp ="2023-03-13T13:25:35.984437Z"; // ISO format or use String timestamp = Instant.now().toString();SignatureKey key =signature.getSignatureKey(isoTimestamp);String timestamp =key.getTimestamp();String signature =key.getSignature();
Confirming an Incoming Signature
confirmSignature
Use the confirmSignature method to confirm the signature you receive while interacting with our servers.
Pass in the timestamp that was returned and the signature String. The method will return a boolean value. True for confirmed and False for unconfirmed