Move const to companion object

This commit is contained in:
Paul Schaub 2023-08-31 16:44:26 +02:00
parent b343b4ad17
commit c40e2ba6c2
Signed by: vanitasvitae
GPG Key ID: 62BEE9264BF17311
1 changed files with 2 additions and 1 deletions

View File

@ -25,7 +25,6 @@ import java.io.IOException
import java.security.KeyPairGenerator
import java.util.*
const val MILLIS_IN_YEAR = 1000L * 60 * 60 * 24 * 365
class KeyRingBuilder : KeyRingBuilderInterface<KeyRingBuilder> {
@ -217,6 +216,8 @@ class KeyRingBuilder : KeyRingBuilderInterface<KeyRingBuilder> {
}
companion object {
const val MILLIS_IN_YEAR = 1000L * 60 * 60 * 24 * 365
@JvmStatic
fun generateKeyPair(spec: KeySpec): PGPKeyPair {
spec.keyType.let { type ->