Passwordfile library  3.1.2
C++ library to read/write passwords from/to encrypted files
openssl.cpp
Go to the documentation of this file.
1 #include "./openssl.h"
2 
3 #include <openssl/conf.h>
4 #include <openssl/err.h>
5 #include <openssl/evp.h>
6 
10 namespace Util {
11 
15 namespace OpenSsl {
16 
20 void init()
21 {
22  // load the human readable error strings for libcrypto
23  ERR_load_crypto_strings();
24  // load all digest and cipher algorithms
25  OpenSSL_add_all_algorithms();
26  // load config file, and other important initialisation
27  OPENSSL_config(NULL);
28 }
29 
33 void clean()
34 {
35  // removes all digests and ciphers
36  EVP_cleanup();
37  // remove error strings
38  ERR_free_strings();
39 }
40 
41 }
42 
43 }
void PASSWORD_FILE_EXPORT init()
Initializes OpenSSL.
Definition: openssl.cpp:20
void PASSWORD_FILE_EXPORT clean()
Cleans resources of OpenSSL.
Definition: openssl.cpp:33
Contains utility classes and functions.
Definition: openssl.h:6