mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-09 10:19:39 +02:00
Add missing method implementations
This commit is contained in:
parent
1141bdf1f8
commit
b5386d844e
3 changed files with 9 additions and 4 deletions
|
@ -90,9 +90,9 @@ class SecretKeyRingEditor(var key: OpenPGPKey, override val referenceTime: Date
|
||||||
}
|
}
|
||||||
builder.hashedSubpackets.apply {
|
builder.hashedSubpackets.apply {
|
||||||
setKeyFlags(info.getKeyFlagsOf(primaryKey.keyID))
|
setKeyFlags(info.getKeyFlagsOf(primaryKey.keyID))
|
||||||
setPreferredHashAlgorithms(hashAlgorithmPreferences)
|
hashAlgorithmPreferences?.let { setPreferredHashAlgorithms(it) }
|
||||||
setPreferredSymmetricKeyAlgorithms(symmetricKeyAlgorithmPreferences)
|
symmetricKeyAlgorithmPreferences?.let { setPreferredSymmetricKeyAlgorithms(it) }
|
||||||
setPreferredCompressionAlgorithms(compressionAlgorithmPreferences)
|
compressionAlgorithmPreferences?.let { setPreferredCompressionAlgorithms(it) }
|
||||||
setFeatures(Feature.MODIFICATION_DETECTION)
|
setFeatures(Feature.MODIFICATION_DETECTION)
|
||||||
}
|
}
|
||||||
builder.applyCallback(callback)
|
builder.applyCallback(callback)
|
||||||
|
|
|
@ -112,7 +112,7 @@ interface SelfSignatureSubpackets : BaseSignatureSubpackets {
|
||||||
|
|
||||||
fun setPreferredHashAlgorithms(algorithms: PreferredAlgorithms?): SelfSignatureSubpackets
|
fun setPreferredHashAlgorithms(algorithms: PreferredAlgorithms?): SelfSignatureSubpackets
|
||||||
|
|
||||||
fun setPreferredAEADCiphersuites(aeadAlgorithms: Set<AEADCipherMode>)
|
fun setPreferredAEADCiphersuites(aeadAlgorithms: Set<AEADCipherMode>): SelfSignatureSubpackets
|
||||||
|
|
||||||
fun addRevocationKey(revocationKey: PGPPublicKey): SelfSignatureSubpackets
|
fun addRevocationKey(revocationKey: PGPPublicKey): SelfSignatureSubpackets
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,7 @@ class SignatureSubpackets :
|
||||||
var preferredCompressionAlgorithmsSubpacket: PreferredAlgorithms? = null
|
var preferredCompressionAlgorithmsSubpacket: PreferredAlgorithms? = null
|
||||||
var preferredSymmetricKeyAlgorithmsSubpacket: PreferredAlgorithms? = null
|
var preferredSymmetricKeyAlgorithmsSubpacket: PreferredAlgorithms? = null
|
||||||
var preferredHashAlgorithmsSubpacket: PreferredAlgorithms? = null
|
var preferredHashAlgorithmsSubpacket: PreferredAlgorithms? = null
|
||||||
|
var preferredAEADCiphersuites: List<AEADCipherMode>? = null
|
||||||
val embeddedSignatureSubpackets: List<EmbeddedSignature> = mutableListOf()
|
val embeddedSignatureSubpackets: List<EmbeddedSignature> = mutableListOf()
|
||||||
var signerUserIdSubpacket: SignerUserID? = null
|
var signerUserIdSubpacket: SignerUserID? = null
|
||||||
var keyExpirationTimeSubpacket: KeyExpirationTime? = null
|
var keyExpirationTimeSubpacket: KeyExpirationTime? = null
|
||||||
|
@ -312,6 +313,10 @@ class SignatureSubpackets :
|
||||||
this.preferredHashAlgorithmsSubpacket = algorithms
|
this.preferredHashAlgorithmsSubpacket = algorithms
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun setPreferredAEADCiphersuites(
|
||||||
|
aeadAlgorithms: Set<AEADCipherMode>
|
||||||
|
): SignatureSubpackets = apply { this.preferredAEADCiphersuites = aeadAlgorithms.toList() }
|
||||||
|
|
||||||
override fun addRevocationKey(revocationKey: PGPPublicKey): SignatureSubpackets = apply {
|
override fun addRevocationKey(revocationKey: PGPPublicKey): SignatureSubpackets = apply {
|
||||||
addRevocationKey(true, revocationKey)
|
addRevocationKey(true, revocationKey)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue