> Do I need to study cryptography and only then look for the way
> a certain cryptography method is done in crypto++;
We need to have at least a very basic idea of cryptography in order to be able to choose an appropriate cryptographic scheme for our specific application. However, knowledge of the innards of how a library implements a cryptographic algorithm is not essential; we only need to understand how the library functions are to be called.
> However I am finding it very (hard) to understand/learn crypto++, how it works
> (meaning its syntax, its functions, how/when to use each function),
> as I haven't yet found a tutorial on crypto++.
Their (poorly maintained and updated) wiki may be of some help.
For example, the SHA2 page has some example programs:
https://www.cryptopp.com/wiki/SHA2
and pages have links to related topics; for example:
https://www.cryptopp.com/wiki/HashFilter
> SHA256, which from what I understood(correct me please if I am wrong), I can use a 256 bit password,
> I don't see how is that not secure enough, a brute-force attack would take years to crack it.
It may be very secure against brute-force attacks;
but it may be somewhat more vulnerable to a well-crafted chosen-ciphertext attack.
https://en.wikipedia.org/wiki/Chosen-ciphertext_attack
Authenticated encryption
https://en.wikipedia.org/wiki/Authenticated_encryption defends against these kinds of attacks. (Encryption alone does not prevent malicious third parties from obtaining the decryptions of chosen-ciphertext messages.)