diff --git a/src/websockets.cpp b/src/websockets.cpp index 554aacb..3f92de1 100644 --- a/src/websockets.cpp +++ b/src/websockets.cpp @@ -480,10 +480,12 @@ void AppDataServer::saveNonceHex(NonceType nt, QString noncehex) { // Encrypt an outgoing message with the stored secret key. QString AppDataServer::encryptOutgoing(QString msg) { - qDebug() << "Encrypting msg"; - if (msg.length() % 256 > 0) { - msg = msg + QString(" ").repeated(256 - (msg.length() % 256)); + int padding = 256; + qDebug() << "Encrypt msg(pad="<