Skip to content

Store & fetch channel key as UTF-8 consistently

While it seems not specified by protocol if the key should match the channel encoding, Konversation's "showkey" command handler assumes UTF-8 by implicitly using fromUtf8 decoding due to the QString(QByteArray) constructor. Also does current code of Cipher::setKey already assume some codec compatible to 7-bit when checking the first 4 bytes for "ecb:" or "cbc:".

Explicitly converting fromUtf8 and always using toUtf8 at least improves consistency in the current code.

@psn @hein @argonel

Merge request reports