diff --git a/pgpainless-core/src/main/kotlin/org/pgpainless/implementation/BcImplementationFactory.kt b/pgpainless-core/src/main/kotlin/org/pgpainless/implementation/BcImplementationFactory.kt index dcf594ea..e889b978 100644 --- a/pgpainless-core/src/main/kotlin/org/pgpainless/implementation/BcImplementationFactory.kt +++ b/pgpainless-core/src/main/kotlin/org/pgpainless/implementation/BcImplementationFactory.kt @@ -86,7 +86,7 @@ class BcImplementationFactory : ImplementationFactory() { override fun getPGPDataEncryptorBuilder(symmetricKeyAlgorithm: Int): PGPDataEncryptorBuilder = BcPGPDataEncryptorBuilder(symmetricKeyAlgorithm) - override fun getPGPKeyPair( + override fun getPGPV4KeyPair( publicKeyAlgorithm: PublicKeyAlgorithm, keyPair: KeyPair, creationDate: Date diff --git a/pgpainless-core/src/main/kotlin/org/pgpainless/implementation/ImplementationFactory.kt b/pgpainless-core/src/main/kotlin/org/pgpainless/implementation/ImplementationFactory.kt index 58478379..ad2ac4c4 100644 --- a/pgpainless-core/src/main/kotlin/org/pgpainless/implementation/ImplementationFactory.kt +++ b/pgpainless-core/src/main/kotlin/org/pgpainless/implementation/ImplementationFactory.kt @@ -100,7 +100,16 @@ abstract class ImplementationFactory { abstract fun getPGPDataEncryptorBuilder(symmetricKeyAlgorithm: Int): PGPDataEncryptorBuilder @Throws(PGPException::class) - abstract fun getPGPKeyPair( + @Deprecated("Replace with versioned getter method, such as getPGPV4KeyPair()", + replaceWith = ReplaceWith("getPGPV4KeyPair")) + fun getPGPKeyPair( + publicKeyAlgorithm: PublicKeyAlgorithm, + keyPair: KeyPair, + creationDate: Date + ): PGPKeyPair = getPGPV4KeyPair(publicKeyAlgorithm, keyPair, creationDate) + + @Throws(PGPException::class) + abstract fun getPGPV4KeyPair( publicKeyAlgorithm: PublicKeyAlgorithm, keyPair: KeyPair, creationDate: Date diff --git a/pgpainless-core/src/main/kotlin/org/pgpainless/implementation/JceImplementationFactory.kt b/pgpainless-core/src/main/kotlin/org/pgpainless/implementation/JceImplementationFactory.kt index 865f1e0d..409b06fa 100644 --- a/pgpainless-core/src/main/kotlin/org/pgpainless/implementation/JceImplementationFactory.kt +++ b/pgpainless-core/src/main/kotlin/org/pgpainless/implementation/JceImplementationFactory.kt @@ -101,7 +101,7 @@ class JceImplementationFactory : ImplementationFactory() { override fun getPGPDataEncryptorBuilder(symmetricKeyAlgorithm: Int): PGPDataEncryptorBuilder = JcePGPDataEncryptorBuilder(symmetricKeyAlgorithm).setProvider(ProviderFactory.provider) - override fun getPGPKeyPair( + override fun getPGPV4KeyPair( publicKeyAlgorithm: PublicKeyAlgorithm, keyPair: KeyPair, creationDate: Date