1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-12-21 13:45:50 +00:00

global update of passport

This commit is contained in:
2021-01-28 16:03:30 +06:00
parent 1dc3ce2fb5
commit e0bf67d8f9
16 changed files with 95 additions and 87 deletions

View File

@@ -18,7 +18,7 @@ class PKCS8Decryptor (key: String): Decryptor {
private val chunkSize: Int = privateKey.modulus.bitLength() / 8
override fun ByteArray.decrypt(): ByteArray {
return Cipher.getInstance("RSA/ECB/PKCS1Padding").run {
return Cipher.getInstance("RSA/ECB/OAEPWITHSHA-256ANDMGF1PADDING").run {
init(Cipher.DECRYPT_MODE, privateKey)
(0 until size step chunkSize).flatMap {
val firstIndex = it