final Date fileDate = account.getContactFiledOn();
final byte[] encText = encrypt(fileName, fileDate, plainText);
final String encStr = new String(encText, "UTF-8");
final Timestamp filedOn = account.getContactFiledOn();
final UrlEncoded u = new UrlEncoded();
if (storeAPPSEC != null) {
u.put("APPSEC", storeAPPSEC);
}
if (account.getPreferredEmail() != null) {
u.put("email", account.getPreferredEmail());
}
if (filedOn != null) {
u.put("filed", String.valueOf(filedOn.getTime() / 1000L));
}
u.put("account_id", String.valueOf(account.getId().get()));
u.put("data", encStr);
connFactory.open(storeUrl).store(u.toString().getBytes("UTF-8"));
} catch (IOException e) {
log.error("Cannot store encrypted contact information", e);
throw new ContactInformationStoreException(e);
} catch (PGPException e) {
log.error("Cannot store encrypted contact information", e);