1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-19 02:42:05 +01:00

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

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 ->