114 void setKey(quint64 key);
118 bool hasKey()
const {
return !m_keyParts.isEmpty(); }
154 QString encryptToString(
const QString& plaintext);
160 QString encryptToString(QByteArray plaintext);
168 QByteArray encryptToByteArray(
const QString& plaintext);
176 QByteArray encryptToByteArray(QByteArray plaintext);
185 QString decryptToString(
const QString& cyphertext);
193 QByteArray decryptToByteArray(
const QString& cyphertext);
201 QString decryptToString(QByteArray cypher);
209 QByteArray decryptToByteArray(QByteArray cypher);
216 CryptoFlagCompression = 0x01,
217 CryptoFlagChecksum = 0x02,
218 CryptoFlagHash = 0x04
220 Q_DECLARE_FLAGS(CryptoFlags, CryptoFlag);
226 QVector<char> m_keyParts;
227 CompressionMode m_compressionMode;
228 IntegrityProtectionMode m_protectionMode;
231 Q_DECLARE_OPERATORS_FOR_FLAGS(SimpleCrypt::CryptoFlags)
233 #endif // SimpleCrypt_H Definition: simplecrypt.h:68
Definition: simplecrypt.h:95
IntegrityProtectionMode
Definition: simplecrypt.h:80
CompressionMode compressionMode() const
Definition: simplecrypt.h:130
Definition: simplecrypt.h:92
CryptoFlag
Definition: simplecrypt.h:213
IntegrityProtectionMode integrityProtectionMode() const
Definition: simplecrypt.h:142
CompressionMode
Definition: simplecrypt.h:66
void setIntegrityProtectionMode(IntegrityProtectionMode mode)
Definition: simplecrypt.h:138
Definition: simplecrypt.h:93
Simple encryption and decryption of strings and byte arrays.
Definition: simplecrypt.h:59
void setCompressionMode(CompressionMode mode)
Definition: simplecrypt.h:126
Error
Definition: simplecrypt.h:90
Definition: DocObject.h:25
bool hasKey() const
Definition: simplecrypt.h:118
Definition: simplecrypt.h:83
Definition: simplecrypt.h:82
Definition: simplecrypt.h:69
Error lastError() const
Definition: simplecrypt.h:147
Definition: simplecrypt.h:94