From c06bedd656223ad3a23d7d33eb496f5f37d7e618 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Tue, 20 Oct 2020 22:59:06 +0200 Subject: [PATCH] Introduce SignatureType enum --- .../pgpainless/algorithm/SignatureType.java | 192 ++++++++++++++++++ .../key/generation/KeyRingBuilder.java | 4 +- 2 files changed, 194 insertions(+), 2 deletions(-) create mode 100644 pgpainless-core/src/main/java/org/pgpainless/algorithm/SignatureType.java diff --git a/pgpainless-core/src/main/java/org/pgpainless/algorithm/SignatureType.java b/pgpainless-core/src/main/java/org/pgpainless/algorithm/SignatureType.java new file mode 100644 index 00000000..0b3b6797 --- /dev/null +++ b/pgpainless-core/src/main/java/org/pgpainless/algorithm/SignatureType.java @@ -0,0 +1,192 @@ +/* + * Copyright 2020 Paul Schaub. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.pgpainless.algorithm; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * Enum that enlists all the Signature Types defined in rfc4880 section 5.2.1 + * See {@link org.bouncycastle.openpgp.PGPSignature} for comparison. + * + * @see