diff --git a/pgpainless-core/src/main/java/org/pgpainless/algorithm/CertificationType.java b/pgpainless-core/src/main/java/org/pgpainless/algorithm/CertificationType.kt similarity index 63% rename from pgpainless-core/src/main/java/org/pgpainless/algorithm/CertificationType.java rename to pgpainless-core/src/main/java/org/pgpainless/algorithm/CertificationType.kt index f5c8ec7e..33025ad6 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/algorithm/CertificationType.java +++ b/pgpainless-core/src/main/java/org/pgpainless/algorithm/CertificationType.kt @@ -1,16 +1,12 @@ -// SPDX-FileCopyrightText: 2022 Paul Schaub +// SPDX-FileCopyrightText: 2023 Paul Schaub // // SPDX-License-Identifier: Apache-2.0 -package org.pgpainless.algorithm; - -import javax.annotation.Nonnull; - -/** - * Subset of {@link SignatureType}, reduced to certification types. - */ -public enum CertificationType { +package org.pgpainless.algorithm +enum class CertificationType( + val signatureType: SignatureType +) { /** * The issuer of this certification does not make any particular assertion as to how well the certifier has * checked that the owner of the key is in fact the person described by the User ID. @@ -34,13 +30,5 @@ public enum CertificationType { POSITIVE(SignatureType.POSITIVE_CERTIFICATION), ; - private final SignatureType signatureType; - - CertificationType(@Nonnull SignatureType signatureType) { - this.signatureType = signatureType; - } - - public @Nonnull SignatureType asSignatureType() { - return signatureType; - } -} + fun asSignatureType() = signatureType +} \ No newline at end of file