public final class

MemorySigner

extends PrivateKeySigner
java.lang.Object
   ↳ com.pspdfkit.signatures.signers.Signer
     ↳ com.pspdfkit.signatures.signers.PrivateKeySigner
       ↳ com.pspdfkit.signatures.signers.MemorySigner

Class Overview

A Signer that uses a given KeyStore.PrivateKeyEntry to sign documents.

Summary

Public Constructors
MemorySigner(String displayName, KeyStore.PrivateKeyEntry signingKeyPair)
Create the memory signer.
Public Methods
void loadPrivateKey(String password, InteractiveSigner.LoadingFeedbackListener feedbackListener, PrivateKeySigner.OnPrivateKeyLoadedCallback onPrivateKeyLoadedCallback)
Loads the KeyStore.PrivateKeyEntry used by this signer.
[Expand]
Inherited Methods
From class com.pspdfkit.signatures.signers.PrivateKeySigner
From class com.pspdfkit.signatures.signers.Signer
From class java.lang.Object
From interface com.pspdfkit.signatures.signers.InteractiveSigner

Public Constructors

public MemorySigner (String displayName, KeyStore.PrivateKeyEntry signingKeyPair)

Create the memory signer. Required parameters are the displayName and the signingKeyPair (a KeyStore.PrivateKeyEntry instance).

Parameters
displayName Name of this signer to be used for UI display.
signingKeyPair Key pair which is used to sign the document. It has to contain both a certificate and a private key. Use loadPrivateKeyFromFile(File, String, String, String) to load a KeyStore.PrivateKeyEntry from a PKCS#12 file.

Public Methods

public void loadPrivateKey (String password, InteractiveSigner.LoadingFeedbackListener feedbackListener, PrivateKeySigner.OnPrivateKeyLoadedCallback onPrivateKeyLoadedCallback)

Loads the KeyStore.PrivateKeyEntry used by this signer. Subclasses have to override this and have to make sure to call the provided PrivateKeySigner.OnPrivateKeyLoadedCallback whenever private key is ready. The method might be called with a LoadingFeedbackListener which should be used by the implementation to notify of important events (e.g. password required, key loading complete, etc.).

Parameters
password An optional password that should be used to load the private key.
feedbackListener A LoadingFeedbackListener to be notified of important loading events, or null.
onPrivateKeyLoadedCallback An OnPrivateKeyLoadedCallback that should be called once the private key has been loaded.