@@ -43,9 +43,9 @@ project(myProject)
4343
4444find_package(OpenSSL REQUIRED)
4545
46- add_executable(myProject main.cpp)
46+ add_executable(myProject main.cpp libcpp-crypto.hpp )
4747
48- target_link_libraries(myProject PRIVATE libcpp-crypto OpenSSL::SSL OpenSSL::Crypto)
48+ target_link_libraries(myProject PRIVATE OpenSSL::SSL OpenSSL::Crypto)
4949
5050```
5151
@@ -176,10 +176,10 @@ You have two different options to create a Public and Private key pair. The firs
176176generateRSAKeyPair function in the library, passing the desired key length as a parameter. Below is a sample code for this usage.
177177
178178``` cpp
179- auto keyPair = CryptoService::generateRSAKeyPair(2048 );
179+ auto keyPair = CryptoService::generateRSAKeyPair(2048 );
180180
181- std::cout << " 2048 bit Public RSA Key:" << std::endl << keyPair.publicKey << std::endl;
182- std::cout << " 2048 bit Private RSA Key:" << std::endl << keyPair.privateKey << std::endl;
181+ std::cout << " 2048 bit Public RSA Key:" << std::endl << keyPair.publicKey << std::endl;
182+ std::cout << " 2048 bit Private RSA Key:" << std::endl << keyPair.privateKey << std::endl;
183183```
184184
185185> [ !TIP]
@@ -190,14 +190,14 @@ Optionally, you can also pass a passphrase as follows to the generateRSAKeyPair
190190you will need to pass this passphrase to the decryptWithRSA function to decrypt the text.
191191
192192``` cpp
193- auto keyPair = CryptoService::generateRSAKeyPair(2048 , " myPassphrase" );
193+ auto keyPair = CryptoService::generateRSAKeyPair(2048 , " myPassphrase" );
194194
195- std::cout << " 2048 bit Public RSA Key (with passphrase) :" << std::endl << keyPair.publicKey << std::endl;
196- std::cout << " 2048 bit Private RSA Key (with passphrase) :" << std::endl << keyPair.privateKey << std::endl;
195+ std::cout << " 2048 bit Public RSA Key:" << std::endl << keyPair.publicKey << std::endl;
196+ std::cout << " 2048 bit Private RSA Key:" << std::endl << keyPair.privateKey << std::endl;
197197```
198198
199- As a second option, if OpenSSL is installed on your system, you can use the necessary OpenSSL commands from the
200- command line to create a Public and Private key pair. As the first step in this option, when you run it by typing
199+ As a second option, if OpenSSL is installed on your system, you can use the necessary OpenSSL commands from the
200+ command line to create a Public and Private key pair. As the first step in this option, when you run it by typing
201201the following line on the command line, a text file named "private_key.pem" will be created containing the private
202202key information.
203203
@@ -234,7 +234,7 @@ character sets can take up twice. I am sharing the table below for a quick refer
234234> time and requires a lot of patience, even for a high-end computer.
235235
236236> [ !CAUTION]
237- > 1024-bit RSA keys are not secure in the face of today's increasing computing power and advanced factorization algorithms.
237+ > 1024-bit RSA keys are not secure in the face of today's increasing computing power and advanced factorization algorithms.
238238> Please use keys of at least 2048 bits.
239239
240240## How to handle Exceptions (AES)?
0 commit comments