mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-14 16:32:06 +01:00
Kotlin conversion: EdDSACurve
This commit is contained in:
parent
32e998305c
commit
7db56ca800
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