2012-04-23 03:14:34 +02:00
|
|
|
//
|
|
|
|
// CryptoTest.h
|
|
|
|
//
|
|
|
|
// Definition of the CryptoTest class.
|
|
|
|
//
|
|
|
|
// Copyright (c) 2008, Applied Informatics Software Engineering GmbH.
|
|
|
|
// and Contributors.
|
|
|
|
//
|
2014-05-04 21:02:42 +02:00
|
|
|
// SPDX-License-Identifier: BSL-1.0
|
2012-04-23 03:14:34 +02:00
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef CryptoTest_INCLUDED
|
|
|
|
#define CryptoTest_INCLUDED
|
|
|
|
|
|
|
|
|
|
|
|
#include "Poco/Crypto/Crypto.h"
|
|
|
|
#include "CppUnit/TestCase.h"
|
|
|
|
|
|
|
|
|
|
|
|
class CryptoTest: public CppUnit::TestCase
|
|
|
|
{
|
|
|
|
public:
|
2019-12-17 12:09:41 +01:00
|
|
|
enum
|
2012-04-23 03:14:34 +02:00
|
|
|
{
|
|
|
|
MAX_DATA_SIZE = 10000
|
|
|
|
};
|
2019-12-17 12:09:41 +01:00
|
|
|
|
2012-04-23 03:14:34 +02:00
|
|
|
CryptoTest(const std::string& name);
|
|
|
|
~CryptoTest();
|
|
|
|
|
|
|
|
void testEncryptDecrypt();
|
|
|
|
void testEncryptDecryptWithSalt();
|
2017-09-26 18:38:53 +02:00
|
|
|
void testEncryptDecryptWithSaltSha1();
|
2012-08-18 04:19:34 +02:00
|
|
|
void testEncryptDecryptDESECB();
|
2018-03-06 22:53:27 +01:00
|
|
|
void testEncryptDecryptGCM();
|
2012-04-23 03:14:34 +02:00
|
|
|
void testStreams();
|
2014-09-18 20:58:41 +02:00
|
|
|
void testPassword();
|
2017-09-26 18:38:53 +02:00
|
|
|
void testPasswordSha1();
|
2014-09-18 20:58:41 +02:00
|
|
|
void testEncryptInterop();
|
|
|
|
void testDecryptInterop();
|
2012-04-23 03:14:34 +02:00
|
|
|
void testCertificate();
|
2019-12-17 12:09:41 +01:00
|
|
|
void testCertificateUTF8();
|
|
|
|
|
2012-04-23 03:14:34 +02:00
|
|
|
void setUp();
|
|
|
|
void tearDown();
|
|
|
|
|
|
|
|
static CppUnit::Test* suite();
|
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // CryptoTest_INCLUDED
|