forked from github/wulkanowy-mirror
Remove jcenter repository and unused code from gradle config (#1360)
This commit is contained in:
@ -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
|
||||
|
@ -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() {
|
||||
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user