116 void setKey(quint64 key);
120 bool hasKey()
const {
return !m_keyParts.isEmpty(); }
156 QString encryptToString(
const QString& plaintext);
162 QString encryptToString(QByteArray plaintext);
170 QByteArray encryptToByteArray(
const QString& plaintext);
178 QByteArray encryptToByteArray(QByteArray plaintext);
187 QString decryptToString(
const QString& cyphertext);
195 QByteArray decryptToByteArray(
const QString& cyphertext);
203 QString decryptToString(QByteArray cypher);
211 QByteArray decryptToByteArray(QByteArray cypher);
218 CryptoFlagCompression = 0x01,
219 CryptoFlagChecksum = 0x02,
220 CryptoFlagHash = 0x04
222 Q_DECLARE_FLAGS(CryptoFlags, CryptoFlag);
228 QVector<char> m_keyParts;
229 CompressionMode m_compressionMode;
230 IntegrityProtectionMode m_protectionMode;
233 Q_DECLARE_OPERATORS_FOR_FLAGS(SimpleCrypt::CryptoFlags)
235 #endif // SimpleCrypt_H #define CORE_EXPORT
Definition: core_defines2.h:10
Definition: simplecrypt.h:70
Definition: simplecrypt.h:97
IntegrityProtectionMode
Definition: simplecrypt.h:82
CompressionMode compressionMode() const
Definition: simplecrypt.h:132
Definition: simplecrypt.h:94
CryptoFlag
Definition: simplecrypt.h:215
IntegrityProtectionMode integrityProtectionMode() const
Definition: simplecrypt.h:144
CompressionMode
Definition: simplecrypt.h:68
void setIntegrityProtectionMode(IntegrityProtectionMode mode)
Definition: simplecrypt.h:140
Definition: simplecrypt.h:95
Simple encryption and decryption of strings and byte arrays.
Definition: simplecrypt.h:61
void setCompressionMode(CompressionMode mode)
Definition: simplecrypt.h:128
Error
Definition: simplecrypt.h:92
bool hasKey() const
Definition: simplecrypt.h:120
Definition: simplecrypt.h:85
Definition: simplecrypt.h:84
Definition: simplecrypt.h:71
Error lastError() const
Definition: simplecrypt.h:149
Definition: simplecrypt.h:96