#ifndef DES3ENCRYPTION_H #define DES3ENCRYPTION_H #include class Des3Encryption { public: Des3Encryption(); public: // PKCS#7 填充函数 QByteArray pkcs7Padding(const QByteArray& data, int blockSize); // PKCS#7 去填充函数 QByteArray pkcs7Unpadding(const QByteArray& data); // DES 加密函数 QByteArray desEncrypt(const QByteArray& data, const QByteArray& key); // DES 解密函数 QByteArray desDecrypt(const QByteArray& data, const QByteArray& key); // 3DES 加密函数 QByteArray des3Encrypt(const QByteArray& data, const QByteArray& key); // 3DES 解密函数 QByteArray des3Decrypt(const QByteArray& data, const QByteArray& key); }; #endif // DES3ENCRYPTION_H