Some checks failed
release / build-release (push) Has been cancelled
- IChannel: creators -> sub-channels -> video posts (public listing API, search mapped) - IRequiresMediaInfoCallback -> signed proxy URLs; stream controller rewrites HLS so the AES-128 key is fetched server-side with the session cookie, segments stay on the CDN - delivery/info cached per token lifetime and throttled (~2/min) - config page: paste sails.sid + validate, extra creators, quality, search test - scripts/package.sh -> plugin folder + zip + md5 + manifest.json; Gitea release workflow - research docs, HAR analysis (HAR itself gitignored), install-pi5.sh Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
23 lines
767 B
Kotlin
23 lines
767 B
Kotlin
package com.coulterpeterson.floatnative.data
|
|
|
|
import android.util.Base64
|
|
import java.security.MessageDigest
|
|
import java.security.SecureRandom
|
|
|
|
object PKCEManager {
|
|
|
|
fun generateCodeVerifier(): String {
|
|
val secureRandom = SecureRandom()
|
|
val codeVerifier = ByteArray(32)
|
|
secureRandom.nextBytes(codeVerifier)
|
|
return Base64.encodeToString(codeVerifier, Base64.URL_SAFE or Base64.NO_WRAP or Base64.NO_PADDING)
|
|
}
|
|
|
|
fun generateCodeChallenge(verifier: String): String {
|
|
val bytes = verifier.toByteArray(Charsets.US_ASCII)
|
|
val md = MessageDigest.getInstance("SHA-256")
|
|
val digest = md.digest(bytes)
|
|
return Base64.encodeToString(digest, Base64.URL_SAFE or Base64.NO_WRAP or Base64.NO_PADDING)
|
|
}
|
|
}
|