1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-19 02:42:05 +01:00

Kotlin conversion: CertificationType

This commit is contained in:
Paul Schaub 2023-08-04 17:02:13 +02:00
parent 94ad4cfbe7
commit 644700c8ee
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -1,16 +1,12 @@
// SPDX-FileCopyrightText: 2022 Paul Schaub <vanitasvitae@fsfe.org>
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
//
// 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
}