Gabriele Contini
2019-09-19 6f5db32d147166ab1617c66844e3297eededc704
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <memory>
#include "CryptoHelper.h"
#ifdef __linux__
#include"linux/CryptoHelperLinux.h"
#elif _WIN32
#include"win/CryptoHelperWindows.h"
#endif
 
using namespace std;
namespace license {
 
unique_ptr<CryptoHelper> CryptoHelper::getInstance() {
#ifdef __linux__ 
    unique_ptr<CryptoHelper> ptr((CryptoHelper*) new CryptoHelperLinux());
#elif _WIN32
    unique_ptr<CryptoHelper> ptr((CryptoHelper*) new CryptoHelperWindows());    
#endif
    return ptr;
}
}