| 1 | /** |
| 2 | * KQOAuth - An OAuth authentication library for Qt. |
| 3 | * |
| 4 | * Author: Johan Paul ([email protected]) |
| 5 | * http://www.johanpaul.com |
| 6 | * |
| 7 | * This library is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU Lesser General Public |
| 9 | * License as published by the Free Software Foundation; either |
| 10 | * version 2.1 of the License, or (at your option) any later version. |
| 11 | * |
| 12 | * KQOAuth is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU Lesser General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU Lesser General Public License |
| 18 | * along with KQOAuth. If not, see <http://www.gnu.org/licenses/>. |
| 19 | */ |
| 20 | #ifndef KQOAUTHUTILS_H |
| 21 | #define KQOAUTHUTILS_H |
| 22 | |
| 23 | #include "kqoauthglobals.h" |
| 24 | |
| 25 | #include <openssl/rsa.h> |
| 26 | |
| 27 | class QString; |
| 28 | class KQOAUTH_EXPORT KQOAuthUtils |
| 29 | { |
| 30 | public: |
| 31 | |
| 32 | static QString hmac_sha1(const QString &message, const QString &key); |
| 33 | static QString rsa_sha1(const QString &message, const QString &key); |
| 34 | |
| 35 | private: |
| 36 | static RSA* getRsaFromKey(const QString &key); |
| 37 | }; |
| 38 | |
| 39 | #endif // KQOAUTHUTILS_H |