chromium/third_party/blink/renderer/platform/crypto.h

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_CRYPTO_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_CRYPTO_H_

#include "base/containers/span.h"
#include "third_party/blink/renderer/platform/platform_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/forward.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"
#include "third_party/boringssl/src/include/openssl/digest.h"

namespace blink {

static const size_t kMaxDigestSize =;
DigestValue;

enum HashAlgorithm {};

PLATFORM_EXPORT bool ComputeDigest(HashAlgorithm,
                                   base::span<const uint8_t> digestable,
                                   DigestValue& digest_result);

PLATFORM_EXPORT bool ComputeDigest(HashAlgorithm,
                                   const SegmentedBuffer* buffer,
                                   DigestValue& digest_result);

class PLATFORM_EXPORT Digestor {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_CRYPTO_H_