public class FileBasedOpenPgpMetadataStore extends AbstractOpenPgpMetadataStore
OpenPgpMetadataStore
, which stores metadata information in a file structure.
The information is stored in the following directory structure:
<basePath>/
<userjid@server.tld>/
announced.list // list of the users announced key fingerprints and modification dates
Constructor and Description |
---|
FileBasedOpenPgpMetadataStore(File basePath) |
Modifier and Type | Method and Description |
---|---|
Map<org.pgpainless.key.OpenPgpV4Fingerprint,Date> |
readAnnouncedFingerprintsOf(BareJid contact)
Read the fingerprints and modification dates of announced keys of a user from local storage.
|
void |
writeAnnouncedFingerprintsOf(BareJid contact,
Map<org.pgpainless.key.OpenPgpV4Fingerprint,Date> metadata)
Write the fingerprints and modification dates of announced keys of a user to local storage.
|
getAnnouncedFingerprintsOf, setAnnouncedFingerprintsOf
public static final String ANNOUNCED
public FileBasedOpenPgpMetadataStore(File basePath)
public Map<org.pgpainless.key.OpenPgpV4Fingerprint,Date> readAnnouncedFingerprintsOf(BareJid contact) throws IOException
AbstractOpenPgpMetadataStore
readAnnouncedFingerprintsOf
in class AbstractOpenPgpMetadataStore
contact
- contactIOException
- IO is dangerouspublic void writeAnnouncedFingerprintsOf(BareJid contact, Map<org.pgpainless.key.OpenPgpV4Fingerprint,Date> metadata) throws IOException
AbstractOpenPgpMetadataStore
writeAnnouncedFingerprintsOf
in class AbstractOpenPgpMetadataStore
contact
- contactmetadata
- announced key fingerprints and latest modification datesIOException
- IO is dangerous