Remove jcenter repository and unused code from gradle config (#1360)

This commit is contained in:
Rafał Borcz
2021-05-28 10:57:25 +02:00
committed by GitHub
parent d13e0adb00
commit 44d5f69de1
6 changed files with 13 additions and 29 deletions

View File

@ -1,7 +1,6 @@
package io.github.wulkanowy.data.repositories
import io.github.wulkanowy.data.db.dao.SchoolAnnouncementDao
import io.github.wulkanowy.data.db.entities.Conference
import io.github.wulkanowy.data.db.entities.SchoolAnnouncement
import io.github.wulkanowy.data.db.entities.Semester
import io.github.wulkanowy.data.db.entities.Student

View File

@ -18,7 +18,6 @@ import io.github.wulkanowy.utils.getThemeAttrColor
import io.github.wulkanowy.utils.lifecycleAwareVariable
import io.github.wulkanowy.utils.toFormattedString
import java.time.LocalDateTime
import java.util.Locale
class TimetableDialog : DialogFragment() {

View File

@ -51,7 +51,10 @@ private val keyStore: KeyStore
private val cipher: Cipher
get() {
return if (SDK_INT >= M) Cipher.getInstance("RSA/ECB/OAEPWithSHA-256AndMGF1Padding", "AndroidKeyStoreBCWorkaround")
return if (SDK_INT >= M) Cipher.getInstance(
"RSA/ECB/OAEPWithSHA-256AndMGF1Padding",
"AndroidKeyStoreBCWorkaround"
)
else Cipher.getInstance("RSA/ECB/PKCS1Padding", "AndroidOpenSSL")
}
@ -97,8 +100,8 @@ fun decrypt(cipherText: String): String {
CipherInputStream(ByteArrayInputStream(decode(cipherText, DEFAULT)), it).let { input ->
val values = ArrayList<Byte>()
var nextByte = 0
while ({ nextByte = input.read(); nextByte }() != -1) {
var nextByte: Int
while (run { nextByte = input.read(); nextByte } != -1) {
values.add(nextByte.toByte())
}
val bytes = ByteArray(values.size)