mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-25 04:17:59 +01:00
Introduce ImplementationFactory.getPGPV4KeyPair()
Preparation for v6
This commit is contained in:
parent
cbbd980554
commit
831e2497ed
3 changed files with 12 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue