mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-09 10:19:39 +02:00
Remove unused SignatureSubpackets callback related methods
This commit is contained in:
parent
db0d753867
commit
ffebdda214
2 changed files with 0 additions and 93 deletions
|
@ -175,52 +175,4 @@ interface BaseSignatureSubpackets {
|
|||
fun addEmbeddedSignature(embeddedSignature: EmbeddedSignature): BaseSignatureSubpackets
|
||||
|
||||
fun clearEmbeddedSignatures(): BaseSignatureSubpackets
|
||||
|
||||
companion object {
|
||||
|
||||
/** Factory method for a [Callback] that does nothing. */
|
||||
@JvmStatic fun nop() = object : Callback {}
|
||||
|
||||
/**
|
||||
* Factory function with receiver, which returns a [Callback] that modifies the hashed
|
||||
* subpacket area of a [BaseSignatureSubpackets] object.
|
||||
*
|
||||
* Can be called like this:
|
||||
* ```
|
||||
* val callback = BaseSignatureSubpackets.applyHashed {
|
||||
* setCreationTime(date)
|
||||
* ...
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@JvmStatic
|
||||
fun applyHashed(function: BaseSignatureSubpackets.() -> Unit): Callback {
|
||||
return object : Callback {
|
||||
override fun modifyHashedSubpackets(hashedSubpackets: BaseSignatureSubpackets) {
|
||||
function(hashedSubpackets)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory function with receiver, which returns a [Callback] that modifies the unhashed
|
||||
* subpacket area of a [BaseSignatureSubpackets] object.
|
||||
*
|
||||
* Can be called like this:
|
||||
* ```
|
||||
* val callback = BaseSignatureSubpackets.applyUnhashed {
|
||||
* setCreationTime(date)
|
||||
* ...
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@JvmStatic
|
||||
fun applyUnhashed(function: BaseSignatureSubpackets.() -> Unit): Callback {
|
||||
return object : Callback {
|
||||
override fun modifyUnhashedSubpackets(unhashedSubpackets: BaseSignatureSubpackets) {
|
||||
function(unhashedSubpackets)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,51 +70,6 @@ class SignatureSubpackets(
|
|||
fun createEmptySubpackets(): SignatureSubpackets {
|
||||
return SignatureSubpackets(PGPSignatureSubpacketGenerator())
|
||||
}
|
||||
|
||||
/** Factory method for a [Callback] that does nothing. */
|
||||
@JvmStatic fun nop() = object : Callback {}
|
||||
|
||||
/**
|
||||
* Factory function with receiver, which returns a [Callback] that modifies the hashed
|
||||
* subpacket area of a [SignatureSubpackets] object.
|
||||
*
|
||||
* Can be called like this:
|
||||
* ```
|
||||
* val callback = SignatureSubpackets.applyHashed {
|
||||
* setCreationTime(date)
|
||||
* ...
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@JvmStatic
|
||||
fun applyHashed(function: SignatureSubpackets.() -> Unit): Callback {
|
||||
return object : Callback {
|
||||
override fun modifyHashedSubpackets(hashedSubpackets: SignatureSubpackets) {
|
||||
function(hashedSubpackets)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Factory function with receiver, which returns a [Callback] that modifies the unhashed
|
||||
* subpacket area of a [SignatureSubpackets] object.
|
||||
*
|
||||
* Can be called like this:
|
||||
* ```
|
||||
* val callback = SignatureSubpackets.applyUnhashed {
|
||||
* setCreationTime(date)
|
||||
* ...
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
@JvmStatic
|
||||
fun applyUnhashed(function: SignatureSubpackets.() -> Unit): Callback {
|
||||
return object : Callback {
|
||||
override fun modifyUnhashedSubpackets(unhashedSubpackets: SignatureSubpackets) {
|
||||
function(unhashedSubpackets)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun setRevocationReason(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue