27 lines
647 B
C++
27 lines
647 B
C++
#pragma once
|
|
|
|
#include "lib/utils/bts_no_copy.h"
|
|
|
|
#include <string>
|
|
|
|
namespace bts {
|
|
namespace crypto {
|
|
|
|
class Digest {
|
|
public:
|
|
static void
|
|
allocate_array(unsigned char **out_digest, unsigned int *out_len);
|
|
static void deallocate_array(unsigned char *out_digest);
|
|
|
|
static void compute_digest(
|
|
const unsigned char *data,
|
|
unsigned long size,
|
|
unsigned char *out_digest,
|
|
unsigned int *out_len);
|
|
static void compute_digest(const std::string &data, std::string *out_digest);
|
|
static std::string compute_digest(const std::string &data);
|
|
};
|
|
|
|
} // namespace crypto
|
|
} // namespace bts
|