Kotlin conversion: EdDSACurve

This commit is contained in:
Paul Schaub 2023-09-07 15:08:10 +02:00
parent 89b73895f5
commit 8f49b01d51
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
2 changed files with 14 additions and 28 deletions

View File

@ -1,28 +0,0 @@
// SPDX-FileCopyrightText: 2020 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
package org.pgpainless.key.generation.type.eddsa;
import javax.annotation.Nonnull;
public enum EdDSACurve {
_Ed25519("ed25519", 256),
;
final String name;
final int bitStrength;
EdDSACurve(@Nonnull String curveName, int bitStrength) {
this.name = curveName;
this.bitStrength = bitStrength;
}
public String getName() {
return name;
}
public int getBitStrength() {
return bitStrength;
}
}

View File

@ -0,0 +1,14 @@
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
//
// SPDX-License-Identifier: Apache-2.0
package org.pgpainless.key.generation.type.eddsa
enum class EdDSACurve(
val curveName: String,
val bitStrength: Int) {
_Ed25519("ed25519", 256),
;
fun getName() = curveName
}