mirror of
https://github.com/usbharu/Hideout.git
synced 2026-09-10 11:14:58 +00:00
feat: Digestをhexからbase64に変更
This commit is contained in:
@@ -61,8 +61,9 @@ val httpSignaturePlugin = createClientPlugin("HttpSign", ::HttpSignaturePluginCo
|
|||||||
if (request.bodyType?.type == String::class) {
|
if (request.bodyType?.type == String::class) {
|
||||||
println(body as String)
|
println(body as String)
|
||||||
println("Digest !!")
|
println("Digest !!")
|
||||||
|
// UserAuthService.sha256.reset()
|
||||||
val digest =
|
val digest =
|
||||||
hex(UserAuthService.sha256.digest((body as String).toByteArray(Charsets.UTF_8)))
|
Base64.getEncoder().encodeToString(UserAuthService.sha256.digest(body.toByteArray(Charsets.UTF_8)))
|
||||||
request.headers.append("Digest", "sha-256="+digest)
|
request.headers.append("Digest", "sha-256="+digest)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user