chromium/components/autofill/core/common/signatures.cc

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

#include "components/autofill/core/common/signatures.h"

#include <string_view>

#include "base/containers/span.h"
#include "base/hash/sha1.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "components/autofill/core/common/autofill_util.h"
#include "components/autofill/core/common/form_data.h"
#include "components/autofill/core/common/form_field_data.h"
#include "url/gurl.h"

namespace autofill {

namespace {

// Returns a copy of |input| without >= 5 consecutive digits.
std::string StripDigitsIfRequired(std::string_view input) {}

template <size_t N>
uint64_t PackBytes(base::span<const uint8_t, N> bytes) {}

}  // namespace

// If a form name was set by Chrome, we should ignore it when calculating
// the form signature.
std::string GetDOMFormName(const std::string& form_name) {}

FormSignature CalculateFormSignature(const FormData& form_data) {}

FormSignature CalculateAlternativeFormSignature(const FormData& form_data) {}

FieldSignature CalculateFieldSignatureByNameAndType(
    std::u16string_view field_name,
    FormControlType field_type) {}

FieldSignature CalculateFieldSignatureForField(
    const FormFieldData& field_data) {}

uint64_t StrToHash64Bit(std::string_view str) {}

uint32_t StrToHash32Bit(std::string_view str) {}

int64_t HashFormSignature(FormSignature form_signature) {}

int64_t HashFieldSignature(FieldSignature field_signature) {}

}  // namespace autofill