NAP
opensslapi.h
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4 
5 #pragma once
6 
7 #include <string>
8 #include <vector>
9 
10 namespace nap
11 {
12  namespace openssl
13  {
22  bool createSignature(const std::string& privkey, const std::string& message, const std::string& signingScheme, std::string& outSignature);
23 
32  bool verifyMessage(const std::string& pubkey, const std::string& message, const std::string& signingScheme, const std::string& signature);
33 
41  bool generateRSAKey(unsigned int bits, std::string& outPrivKey, std::string& outPubKey);
42 
48  std::string sha256(const std::string& str);
49 
55  std::string encode64(const std::string& str);
56 
62  std::string decode64(const std::string& str);
63  }
64 }
nap::openssl::sha256
std::string sha256(const std::string &str)
nap::openssl::verifyMessage
bool verifyMessage(const std::string &pubkey, const std::string &message, const std::string &signingScheme, const std::string &signature)
nap::openssl::encode64
std::string encode64(const std::string &str)
nap::openssl::createSignature
bool createSignature(const std::string &privkey, const std::string &message, const std::string &signingScheme, std::string &outSignature)
nap::openssl::generateRSAKey
bool generateRSAKey(unsigned int bits, std::string &outPrivKey, std::string &outPubKey)
nap
Definition: templateapp.h:17
nap::openssl::decode64
std::string decode64(const std::string &str)