diff options
Diffstat (limited to 'crypt/hybridcrypt.cpp')
| -rw-r--r-- | crypt/hybridcrypt.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/crypt/hybridcrypt.cpp b/crypt/hybridcrypt.cpp index 7376459..66b8b6b 100644 --- a/crypt/hybridcrypt.cpp +++ b/crypt/hybridcrypt.cpp @@ -3,8 +3,7 @@ HybridCrypt::HybridCrypt() { // Initialisiere Nutzerschlüssel mit NULL - privateUserkey = NULL; - publicUserkey = NULL; + userKeypair = NULL; // Lade die menschenlesbaren Fehlerstrings für LibCrypto ERR_load_crypto_strings(); @@ -23,14 +22,9 @@ HybridCrypt::HybridCrypt() HybridCrypt::~HybridCrypt() { // Räume Nutzerschlüssel auf - if (privateUserkey != NULL) + if (userKeypair != NULL) { - EVP_PKEY_free(privateUserkey); - } - - if (publicUserkey != NULL) - { - EVP_PKEY_free(publicUserkey); + EVP_PKEY_free(userKeypair); } // Räume OpenSSL auf @@ -85,7 +79,7 @@ void HybridCrypt::createKeypair() } // Erzeuge den Schlüssel - if (EVP_PKEY_keygen(ctx, &privateUserkey) <= 0) + if (EVP_PKEY_keygen(ctx, &userKeypair) <= 0) { throwOpenSslException(); } |
