Package dev.inmo.tgbotapi.utils.passport

Types

AESDecryptor
Link copied to clipboard
class AESDecryptor(key: SourceBytes, iv: ByteArray) : Decryptor
Decryptor
Link copied to clipboard
common
interface Decryptor

Functions

createDecryptor
Link copied to clipboard
fun EndDataCredentials.createDecryptor(): Decryptor
fun Pair<SourceBytes, SourceBytes>.createDecryptor(): Decryptor
decryptData
Link copied to clipboard
fun EndDataCredentials.decryptData(bytes: EncryptedData): SourceBytes
decryptFile
Link copied to clipboard
fun FileCredentials.decryptFile(fileBytes: ByteArray): SourceBytes
suspend fun FileCredentials.decryptFile(bot: TelegramBot, passportFile: PassportFile): SourceBytes
decryptWithPKCS8PrivateKey
Link copied to clipboard
fun EncryptedCredentials.decryptWithPKCS8PrivateKey(privateKey: PrivateKey): DecryptedCredentials
fun EncryptedCredentials.decryptWithPKCS8PrivateKey(key: String): DecryptedCredentials
doInDecryptionContextWithPKCS8Key
Link copied to clipboard
inline fun <T> PassportData.doInDecryptionContextWithPKCS8Key(pkcs8Key: PrivateKey, expectedNonce: String? = null, crossinline block: SecureData.() -> T): T
inline fun <T> PassportData.doInDecryptionContextWithPKCS8Key(pkcs8Key: String, expectedNonce: String? = null, crossinline block: SecureData.() -> T): T