diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2021-02-18 17:06:27 +0100 |
---|---|---|
committer | Thomas Wolf <thomas.wolf@paranor.ch> | 2021-02-19 08:10:39 +0100 |
commit | cd12b570ff3a642f633a52a305b79922479e30a8 (patch) | |
tree | 4d3a52999be0ba8355fa2d17ebac95bb1e971925 /org.eclipse.jgit.gpg.bc/src/org | |
parent | 3b94ba6c24451ec3fc0c46b65125aba46ca299a5 (diff) | |
download | jgit-cd12b570ff3a642f633a52a305b79922479e30a8.tar.gz jgit-cd12b570ff3a642f633a52a305b79922479e30a8.zip |
[GPG] Provide a factory for the BouncyCastleGpgSigner
Otherwise client code has no way to ever create an instance without
using internal non-API.
Change-Id: I6201f98d4b1704a053159967b8adacd98e368522
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.gpg.bc/src/org')
-rw-r--r-- | org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/BouncyCastleGpgSignerFactory.java | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/BouncyCastleGpgSignerFactory.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/BouncyCastleGpgSignerFactory.java new file mode 100644 index 0000000000..fdd1a2b11a --- /dev/null +++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/BouncyCastleGpgSignerFactory.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2021 Thomas Wolf <thomas.wolf@paranor.ch> and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.gpg.bc; + +import org.eclipse.jgit.gpg.bc.internal.BouncyCastleGpgSigner; +import org.eclipse.jgit.lib.GpgSigner; + +/** + * Factory for creating a {@link GpgSigner} based on Bouncy Castle. + * + * @since 5.11 + */ +public final class BouncyCastleGpgSignerFactory { + + private BouncyCastleGpgSignerFactory() { + // No instantiation + } + + /** + * Creates a new {@link GpgSigner}. + * + * @return the {@link GpgSigner} + */ + public static GpgSigner create() { + return new BouncyCastleGpgSigner(); + } +} |