From f31b11e03ba396c6a2846432c687d08c35599934 Mon Sep 17 00:00:00 2001 From: EndrII Date: Mon, 17 Jul 2023 23:07:28 +0200 Subject: [PATCH] fix documentation --- CONTRIBUTING.md | 15 +++++++++++---- README.md | 48 ++++++++++++++++-------------------------------- doxygen.conf.in | 3 ++- 3 files changed, 29 insertions(+), 37 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index efc6609..c5ad762 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,17 +1,21 @@ # Contributing in to EeasySSL + This is a wrap library for the Qt developers. So if you think that is a good library, and you use it in your projects - you can add new improvements and create a pull request with new features. ## What can you do for this Library ? + 1. You can add a support of new encryption algorithms 2. You can implement new certificate generator. ## Adding new implementation of crypto algorithms + All Algorithms must be pass simple test. Encrypt, decrypt short and long data arrays. This simple test already implemented, and you just need to add it into main test file. ### Example Adding supporting RSA algorithm to this library. 1. Create implementation of the iCrypto interface. + ```cpp #include "icrypto.h" @@ -32,9 +36,11 @@ Adding supporting RSA algorithm to this library. } ``` -Full implementation of the RSA you can see here. + +Full implementation of the RSA you can see [here](https://github.com/QuasarApp/easyssl/blob/main/src/lib/src/public/easyssl/rsassl.h). 2. Add your class to the tests Using The Template class "[CryptoTest](https://github.com/QuasarApp/easyssl/blob/main/tests/units/cryptotest.h)". See The [tstMain.cpp](https://github.com/QuasarApp/easyssl/blob/main/tests/tstMain.cpp) file + ``` cpp TestCase(cryptoTestRSA, CryptoTest) ``` @@ -57,9 +63,9 @@ Full implementation of the RSA you can see here. }; ``` -Full implementation of x509 certificate format you can see here. +Full implementation of x509 certificate format you can see [here](https://github.com/QuasarApp/easyssl/blob/main/src/lib/src/public/easyssl/x509.h). -2. Add your class to the tests Using The Template class "[CrtTest]()". See The [tstMain.cpp](https://github.com/QuasarApp/easyssl/blob/main/tests/tstMain.cpp) file +2. Add your class to the tests Using The Template class "[CrtTest](https://github.com/QuasarApp/easyssl/blob/main/tests/units/crttest.h)". See The [tstMain.cpp](https://github.com/QuasarApp/easyssl/blob/main/tests/tstMain.cpp) file ```cpp #include "crttest.h" @@ -70,7 +76,8 @@ Full implementation of x509 certificate format you can see here. ``` ## Extra rools -1. All shared tools or useful functions located on the EasySSLUtils class. + +1. All shared tools or useful functions located on the [EasySSLUtils](https://github.com/QuasarApp/easyssl/blob/main/src/lib/src/private/easysslutils.h) class. 2. All implementation must contains goxygen xml comments (documentation) diff --git a/README.md b/README.md index ee03390..5c73651 100644 --- a/README.md +++ b/README.md @@ -37,40 +37,21 @@ This library contains interfaces for the signing and encription data. ### Encription ```cpp -#include +#include "easyssl/rsassl.h" -class ECDSA: public EasySSL::AuthECDSA { +// create a publick and private keys array. +int main() { + QByteArray pub, priv; + EasySSL::RSASSL crypto; + crypto.makeKeys(pub, priv) + + auto siganture = crypto.signMessage(message, priv); + crypto.checkSign(message, siganture, pub); + + auto encriptedMsg = crypto.encrypt(message, pub); + auto decryptedMsg = crypto.decrypt(encriptedMsg, priv); +} -public: - - // AsyncKeysAuth interface - void setPrivateKey(const QByteArray &newPriv) { - _priv = newPriv; - } - - QByteArray getPrivateKey() const { - return _priv; - }; - -private: - QByteArray _priv; - -}; - -ECDSA edsa; -QByteArray pub, priv; -QString userID; - -// make public and private keys. -edsa.makeKeys(pub, priv); -edsa.setPrivateKey(priv); -edsa.setPublicKey(pub); - -// prepare an authentication object. -edsa.prepare(); -edsa.setPrivateKey({}); - -edsa.auth(1000, &userID) ``` @@ -115,4 +96,7 @@ edsa.auth(1000, &userID) ``` +## Do not forget to help us make this library better... +See our main documentation about contributing to [EasySsl](https://github.com/QuasarApp/easyssl/blob/main/CONTRIBUTING.md) + Full documentation available [here](https://quasarapp.ddns.net:3031/docs/QuasarApp/easyssl/latest/index.html) diff --git a/doxygen.conf.in b/doxygen.conf.in index 25cb8ad..bd6f08d 100644 --- a/doxygen.conf.in +++ b/doxygen.conf.in @@ -791,7 +791,8 @@ WARN_LOGFILE = # Note: If this tag is empty the current directory is searched. INPUT = src \ - README.md + README.md \ + CONTRIBUTING.md # This tag can be used to specify the character encoding of the source files