Make server get filetype and identify file
This commit is contained in:
parent
7197c347ea
commit
20400fe4f3
@ -94,13 +94,18 @@ class Connect {
|
|||||||
val encodedKey = encodeBase64(keyBytes)
|
val encodedKey = encodeBase64(keyBytes)
|
||||||
println(encryptText(encodedKey, pKey))
|
println(encryptText(encodedKey, pKey))
|
||||||
writer.println(encryptText(encodedKey, pKey))
|
writer.println(encryptText(encodedKey, pKey))
|
||||||
|
|
||||||
reader.readLine()
|
reader.readLine()
|
||||||
|
|
||||||
val encodedIV = encodeBase64(ivBytes)
|
val encodedIV = encodeBase64(ivBytes)
|
||||||
println(encryptText(encodedIV,pKey))
|
println(encryptText(encodedIV,pKey))
|
||||||
writer.println(encryptText(encodedIV, pKey))
|
writer.println(encryptText(encodedIV, pKey))
|
||||||
reader.readLine()
|
reader.readLine()
|
||||||
|
|
||||||
|
|
||||||
|
val encodedUid = encodeBase64(android.os.Process.myUid().toString().toByteArray())
|
||||||
|
writer.println(encryptText(encodedUid, pKey))
|
||||||
|
reader.readLine()
|
||||||
|
|
||||||
for (chunk in chunks) {
|
for (chunk in chunks) {
|
||||||
val cipherText = encrypt(algorithm, chunk, key, iv).lines().joinToString("")
|
val cipherText = encrypt(algorithm, chunk, key, iv).lines().joinToString("")
|
||||||
writer.println(cipherText)
|
writer.println(cipherText)
|
||||||
|
Loading…
Reference in New Issue
Block a user