From 2df62a995a13e39ba339e15e4def910e9b29b51b Mon Sep 17 00:00:00 2001 From: Artem Chepurnoy Date: Tue, 19 Nov 2024 15:24:40 +0200 Subject: [PATCH] improvement: Limit the max lines of RSA private key to 24 --- .../feature/home/vault/screen/VaultViewStateProducer.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/src/commonMain/kotlin/com/artemchep/keyguard/feature/home/vault/screen/VaultViewStateProducer.kt b/common/src/commonMain/kotlin/com/artemchep/keyguard/feature/home/vault/screen/VaultViewStateProducer.kt index c8be340d..4ff36a98 100644 --- a/common/src/commonMain/kotlin/com/artemchep/keyguard/feature/home/vault/screen/VaultViewStateProducer.kt +++ b/common/src/commonMain/kotlin/com/artemchep/keyguard/feature/home/vault/screen/VaultViewStateProducer.kt @@ -1015,6 +1015,10 @@ private fun RememberStateFlowScope.oh( title = translate(Res.string.private_key), value = sshKey.privateKey, verify = verify.takeIf { concealFields }, + // Private key might be too long to show if you + // select a 4096-bit RSA. There's no point in + // torturing the device rendering that string. + maxLines = 24, monospace = true, colorize = true, elevated = true,