mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-11-14 16:32:06 +01:00
Kotlin conversion: RsaLength
This commit is contained in:
parent
b76c0461fa
commit
6132636e34
2 changed files with 17 additions and 29 deletions
|
@ -1,29 +0,0 @@
|
|||
// SPDX-FileCopyrightText: 2018 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.pgpainless.key.generation.type.rsa;
|
||||
|
||||
import org.pgpainless.key.generation.type.KeyLength;
|
||||
|
||||
public enum RsaLength implements KeyLength {
|
||||
@Deprecated
|
||||
_1024(1024),
|
||||
@Deprecated
|
||||
_2048(2048),
|
||||
_3072(3072),
|
||||
_4096(4096),
|
||||
_8192(8192),
|
||||
;
|
||||
|
||||
private final int length;
|
||||
|
||||
RsaLength(int length) {
|
||||
this.length = length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLength() {
|
||||
return length;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
// SPDX-FileCopyrightText: 2023 Paul Schaub <vanitasvitae@fsfe.org>
|
||||
//
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
package org.pgpainless.key.generation.type.rsa
|
||||
|
||||
import org.pgpainless.key.generation.type.KeyLength
|
||||
|
||||
enum class RsaLength(override val length: Int) : KeyLength {
|
||||
@Deprecated("1024 bits are considered too weak for RSA nowadays.", ReplaceWith("_3072"))
|
||||
_1024(1024),
|
||||
@Deprecated("2048 bits are considered too weak for RSA nowadays.", ReplaceWith("_3072"))
|
||||
_2048(2048),
|
||||
_3072(3072),
|
||||
_4096(4096),
|
||||
_8192(8192)
|
||||
}
|
Loading…
Reference in a new issue