mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-23 03:17:58 +01:00
Kotlin conversion: EdDSACurve
This commit is contained in:
parent
89b73895f5
commit
8f49b01d51
2 changed files with 14 additions and 28 deletions
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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
|
||||
}
|
Loading…
Reference in a new issue