diff --git a/connectrsa.kt b/connectrsa.kt index 0985456..34126bc 100644 --- a/connectrsa.kt +++ b/connectrsa.kt @@ -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)