summaryrefslogtreecommitdiff
path: root/src/sha1_openssl.cc
blob: 9e6d77eec22fce92a18255c37090aa25f56a6a38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "sha1.hh"

#include <openssl/sha.h>

namespace sha1 {

std::array<uint8_t, 20> hash(std::span<uint8_t const> input) {
  std::array<uint8_t, 20> ret;
  SHA1(input.data(), input.size(), ret.data());
  return ret;
}

}  // namespace sha1