#include "wave-crypto.h"
#include <openssl/des.h>
#include <openssl/rsa.h>
#include <openssl/sha.h>
#include "common/wave_ex.h"
#include "perf/perf.h"
Go to the source code of this file.
Namespaces | |
namespace | crypto |
Typedefs | |
typedef std::vector< byte_t > | crypto::byte_vec_t |
Functions | |
static void | crypto::initializeDecoding (void) throw () |
static void | crypto::encodeInt32 (IO std::string &out, IN int32_t l) |
static int32_t | crypto::decodeInt32 (IN const char *p) |
static long | crypto::symmetricEncrypt (IN const byte_t *input, IN long bytes, IN DES_key_schedule *ks, IN int flag, OUT byte_vec_t &output) |
void | crypto::decodeBase64 (IN const char *encoded, OUT byte_vec_t &data) |
std::string | crypto::getSHA1 (IN const char *data) |
quick one-way encryption (SHA1 algorithm, see http://en.wikipedia.org/wiki/SHA-1) | |
std::string | crypto::encodeBase64 (IN const byte_t *data, IN long bytes, IN bool encodeLength=true) |
given binary data, encode into base64 ascii string | |
Variables | |
static const int | crypto::s_keyNumber = 1536 |
static const long | crypto::s_keyExponent = 65537 |
static const int | crypto::s_padding = RSA_PKCS1_OAEP_PADDING |
static const int32_t | crypto::s_maxEncodeLength = 0x007FFFFFF |
static const int | crypto::s_bytesPerDESBlock = 8 |
static char | crypto::s_base64encode [65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_" |
static int | crypto::s_base64decode [128] |