Remove unneeded and potentially encoding switching re-encoding of key
getKeyForRecipient() returns the raw QByteArray, which got assigned to the QString cipherKey by operator=(const QByteArray&), which uses fromUtf8(). Converting the key back to QByteArray using toLocal8Bit() will result in a changed and thus broken key on systems not using UTF-8. There is no need for conversion to and from QString at all though.
Edited by Friedrich W. H. Kossebau