okio v2.9.0 Release Notes
-
2020-10-04
- Fix: Don't corrupt the
Buffer
when writing a slice of a segmentedByteString
. We had a severe bug whereByteString
instances created withsnapshot()
andreadByteString()
incorrectly adjusted the buffer's size by their full length, not the length of the slice. This would have caused buffer reads to crash! We do not believe data was silently corrupted. - New:
CipherSink
andCipherSource
. Use these withjavax.crypto.Cipher
to encrypt and decrypt streams of data. This is a low-level encryption API; most applications should use higher-level APIs like TLS when available. - New: Promote hash functions
md5
,sha1()
,sha512()
, andsha256()
to common Kotlin. These are currently only available onByteString
, multiplatform support forHashingSource
,HashingSink
, andBuffer
should come in a follow-up release. We wrote and optimized our own implementations of these hash functions in Kotlin. On JVM and Android platforms Okio still uses the platform's built-in hash functions. - New: Support OSGi metadata.
- Upgrade: [Kotlin 1.4.10][kotlin_1_4_10].
- Fix: Don't corrupt the