missing docs

This commit is contained in:
Sergey Chernov 2024-06-19 20:22:55 +07:00
parent 1a2febe519
commit c0317dda47

View File

@ -153,14 +153,27 @@ sealed class Container {
} }
} }
/**
* Add one or more recipients to the __decrypted__ container using a standard builder. Note that
* [Builder.fill] is not working in this case.
*/
fun addRecipients(builder: Builder.() -> Unit): Container = fun addRecipients(builder: Builder.() -> Unit): Container =
if (this is Single) asOpenMulti.addRecipients(builder) if (this is Single) asOpenMulti.addRecipients(builder)
else { else {
Builder(this).apply(builder).build() Builder(this).apply(builder).build()
} }
/**
* Add e key to the __decrypted__ container
*/
operator fun plus(recipient: Asymmetric.PublicKey) = addRecipients { key(recipient) } operator fun plus(recipient: Asymmetric.PublicKey) = addRecipients { key(recipient) }
/**
* Add e key to the __decrypted__ container
*/
operator fun plus(recipient: EncryptingKey) = addRecipients { key(recipient) } operator fun plus(recipient: EncryptingKey) = addRecipients { key(recipient) }
/**
* Add e sender -> recipient asymmetric keys pair key to the __decrypted__ container
*/
operator fun plus(pair: Pair<Asymmetric.SecretKey,Asymmetric.PublicKey>) = addRecipients { key(pair) } operator fun plus(pair: Pair<Asymmetric.SecretKey,Asymmetric.PublicKey>) = addRecipients { key(pair) }
/** /**