aboutsummaryrefslogtreecommitdiffstats
path: root/3rdparty/python-console/test_console.cpp
blob: d025f26bef967eac6750017f0a2ca24679df4c59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <iostream>
#include <QApplication>
#include <QMainWindow>
#include <QWidget>
#include <QGridLayout>
#include <QTextEdit>

#include "Console.h"
#include "Interpreter.h"

Console* console;

void SetupWindow( int argc, char *argv[] )
{
    QMainWindow* window = new QMainWindow;
    window->resize( 800, 600 );
    QWidget* centralWidget = new QWidget(window);
    QGridLayout* layout = new QGridLayout(centralWidget);
    console = new Console;
    layout->addWidget(console, 0, 0, 1, 1);
    window->setCentralWidget(centralWidget);
    window->show( );
}

int main( int argc, char *argv[] )
{
    QApplication app( argc, argv );
    Interpreter::Initialize( );

    SetupWindow( argc, argv );

    bool res = app.exec( );
    delete console;
    Interpreter::Finalize( );
    return res;
}
ned char *, RSA *, int); int RSA_print(BIO *, const RSA *, int); int RSA_verify_PKCS1_PSS(RSA *, const unsigned char *, const EVP_MD *, const unsigned char *, int); int RSA_padding_add_PKCS1_PSS(RSA *, unsigned char *, const unsigned char *, const EVP_MD *, int); int RSA_padding_add_PKCS1_OAEP(unsigned char *, int, const unsigned char *, int, const unsigned char *, int); int RSA_padding_check_PKCS1_OAEP(unsigned char *, int, const unsigned char *, int, int, const unsigned char *, int); """ MACROS = """ int EVP_PKEY_CTX_set_rsa_padding(EVP_PKEY_CTX *, int); int EVP_PKEY_CTX_set_rsa_pss_saltlen(EVP_PKEY_CTX *, int); int EVP_PKEY_CTX_set_rsa_mgf1_md(EVP_PKEY_CTX *, EVP_MD *); """ CUSTOMIZATIONS = """ #if OPENSSL_VERSION_NUMBER >= 0x10000000 static const long Cryptography_HAS_PSS_PADDING = 1; #else /* see evp.py for the definition of Cryptography_HAS_PKEY_CTX */ static const long Cryptography_HAS_PSS_PADDING = 0; int (*EVP_PKEY_CTX_set_rsa_padding)(EVP_PKEY_CTX *, int) = NULL; int (*EVP_PKEY_CTX_set_rsa_pss_saltlen)(EVP_PKEY_CTX *, int) = NULL; static const long RSA_PKCS1_PSS_PADDING = 0; #endif #if OPENSSL_VERSION_NUMBER >= 0x1000100f static const long Cryptography_HAS_MGF1_MD = 1; #else static const long Cryptography_HAS_MGF1_MD = 0; int (*EVP_PKEY_CTX_set_rsa_mgf1_md)(EVP_PKEY_CTX *, EVP_MD *) = NULL; #endif """