private byte[] singleSign(final byte[] data, final Alias alias) {
Assert.notEmpty(data, "data");
try {
Store store = this.parameters.getStore();
PrivateKeyEntry privateEntry = (PrivateKeyEntry) store.get(alias, StoreEntryType.PRIVATE_KEY);
if (privateEntry == null) {
throw new SignerException("Private key '" + alias.getName() + " not found in store");
}
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
PrivateKey privateKey = privateEntry.getValue();
Certificate[] chain = privateEntry.getChain();
X509Certificate certificate = (X509Certificate) chain[0];
DigestType digestType = this.getDigestTypeFromSignature(certificate.getSigAlgName());
Calendar calendar = Calendar.getInstance();