Commit 02324ca6 authored by Ricki Hirner's avatar Ricki Hirner

Use Kotlin-friendly okio 2.x instead of 1.x

parent 4f7fc76a
Pipeline #46267580 passed with stages
in 3 minutes and 51 seconds
[![build status](](
# dav4jvm
dav4jvm is a WebDAV/CalDAV/CardDAV library for JVM (Java/Kotlin). It was
developed for [DAVx⁵]( initially.
Original repository:
Generated KDoc:
......@@ -16,13 +13,13 @@ Generated KDoc:
dav4jvm is licensed under [Mozilla Public License, v. 2.0](LICENSE).
For questions, suggestions etc. please use this forum:
For questions, suggestions etc. use this forum (tag the post with "dav4jvm"):
If you want to contribute, please work in your own repository and then
notify us on your changes so that we can backport them.
send a merge requests.
Email: [](
Email: []( (please use the forum instead)
## Contributors
......@@ -18,6 +18,7 @@ repositories {
dependencies {
implementation("org.ogce:xpp3:${Libs.xpp3Version}") // XmlPullParser
......@@ -14,6 +14,7 @@ import
import java.nio.ByteBuffer
import java.util.*
import java.util.concurrent.atomic.AtomicInteger
import okio.ByteString.Companion.toByteString
* Handler to manage authentication against a given service (may be limited to one domain).
......@@ -41,12 +42,12 @@ class BasicDigestAuthHandler(
var nonceCount = AtomicInteger(1)
fun quotedString(s: String) = "\"" + s.replace("\"", "\\\"") + "\""
fun h(data: String) = ByteString.of(ByteBuffer.wrap(data.toByteArray())).md5().hex()!!
fun h(data: String) = data.toByteArray().toByteString().md5().hex()
fun h(body: RequestBody): String {
val buffer = Buffer()
return ByteString.of(ByteBuffer.wrap(buffer.readByteArray())).md5().hex()
return buffer.readByteArray().toByteString().md5().hex()
fun kd(secret: String, data: String) = h("$secret:$data")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment