Skip to content

Commit d760cda

Browse files
committed
Added documentation on lifecycle of CipherSource-supplied Cipher instance.
1 parent 6facf43 commit d760cda

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/src/main/java/nl/nl2312/okio/cipher/CipherSource.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ import okio.ForwardingSource
55
import okio.Source
66
import javax.crypto.Cipher
77

8+
89
/**
910
* Accepts an encrypted [Source] and deciphers it on the fly.
1011
*
1112
* <p>Chunked and partial reading is supported. However, the deciphered output text is not complete until the [Source]
12-
* is drained. Do not attempt to (re-)use the supplied [cipher] until the full source stream is completed.
13+
* is drained. It is an error to attempt to (re-)use the supplied [cipher] during or after the streaming, without
14+
* explicitly calling its [Cipher.init] again.
1315
*/
1416
class CipherSource(
1517
source: Source,

0 commit comments

Comments
 (0)