Add SubkeyLookupFactory class

This commit is contained in:
Paul Schaub 2022-08-12 15:08:33 +02:00
parent a3162f0cf9
commit 991fea2503
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
3 changed files with 65 additions and 0 deletions

View file

@ -0,0 +1,14 @@
// SPDX-FileCopyrightText: 2022 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
package pgp.cert_d.subkey_lookup;
import java.io.File;
public class InMemorySubkeyLookupFactory implements SubkeyLookupFactory {
@Override
public SubkeyLookup createFileBasedInstance(File baseDirectory) {
return new InMemorySubkeyLookup();
}
}

View file

@ -0,0 +1,18 @@
// SPDX-FileCopyrightText: 2022 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
package pgp.cert_d.subkey_lookup;
import java.io.File;
public interface SubkeyLookupFactory {
/**
* Create a new {@link SubkeyLookup} instance that lives in the given baseDirectory.
*
* @param baseDirectory base directory
* @return subkey lookup
*/
SubkeyLookup createFileBasedInstance(File baseDirectory);
}