#include "rtc_base/message_digest.h"
#include <string.h>
#include <cstdint>
#include <memory>
#include "absl/strings/string_view.h"
#include "rtc_base/openssl_digest.h"
#include "rtc_base/string_encode.h"
namespace rtc {
const char DIGEST_MD5[] = …;
const char DIGEST_SHA_1[] = …;
const char DIGEST_SHA_224[] = …;
const char DIGEST_SHA_256[] = …;
const char DIGEST_SHA_384[] = …;
const char DIGEST_SHA_512[] = …;
static const size_t kBlockSize = …;
MessageDigest* MessageDigestFactory::Create(absl::string_view alg) { … }
bool IsFips180DigestAlgorithm(absl::string_view alg) { … }
size_t ComputeDigest(MessageDigest* digest,
const void* input,
size_t in_len,
void* output,
size_t out_len) { … }
size_t ComputeDigest(absl::string_view alg,
const void* input,
size_t in_len,
void* output,
size_t out_len) { … }
std::string ComputeDigest(MessageDigest* digest, absl::string_view input) { … }
bool ComputeDigest(absl::string_view alg,
absl::string_view input,
std::string* output) { … }
std::string ComputeDigest(absl::string_view alg, absl::string_view input) { … }
size_t ComputeHmac(MessageDigest* digest,
const void* key,
size_t key_len,
const void* input,
size_t in_len,
void* output,
size_t out_len) { … }
size_t ComputeHmac(absl::string_view alg,
const void* key,
size_t key_len,
const void* input,
size_t in_len,
void* output,
size_t out_len) { … }
std::string ComputeHmac(MessageDigest* digest,
absl::string_view key,
absl::string_view input) { … }
bool ComputeHmac(absl::string_view alg,
absl::string_view key,
absl::string_view input,
std::string* output) { … }
std::string ComputeHmac(absl::string_view alg,
absl::string_view key,
absl::string_view input) { … }
}