1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2025-09-11 03:09:41 +02:00

Fix IndexOutOfBounds, but keep decryption with only SK working

This commit is contained in:
Paul Schaub 2025-07-14 21:33:51 +02:00
parent de3afbfc1d
commit 446526c7ec
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
2 changed files with 5 additions and 6 deletions

View file

@ -152,7 +152,7 @@ class EncryptImpl(private val api: PGPainless) : Encrypt {
}
override fun withPassword(password: String): Encrypt = apply {
encryptionOptions.addMessagePassphrase(Passphrase.fromPassword(password))
encryptionOptions.addMessagePassphrase(Passphrase.fromPassword(password).withTrimmedWhitespace())
}
private fun modeToStreamEncoding(mode: EncryptAs): StreamEncoding {