forked from sergeych/crypto2
missing docs
This commit is contained in:
parent
1a2febe519
commit
c0317dda47
@ -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) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user