Make server get filetype and identify file

This commit is contained in:
Joren Schipman 2024-05-01 22:30:04 +02:00
parent 7197c347ea
commit 20400fe4f3
Signed by untrusted user who does not match committer: Joren
GPG Key ID: 280E33DFBC0F1B55

View File

@ -94,13 +94,18 @@ class Connect {
val encodedKey = encodeBase64(keyBytes)
println(encryptText(encodedKey, pKey))
writer.println(encryptText(encodedKey, pKey))
reader.readLine()
val encodedIV = encodeBase64(ivBytes)
println(encryptText(encodedIV,pKey))
writer.println(encryptText(encodedIV, pKey))
reader.readLine()
val encodedUid = encodeBase64(android.os.Process.myUid().toString().toByteArray())
writer.println(encryptText(encodedUid, pKey))
reader.readLine()
for (chunk in chunks) {
val cipherText = encrypt(algorithm, chunk, key, iv).lines().joinToString("")
writer.println(cipherText)