chromium/components/web_package/signed_web_bundles/signed_web_bundle_id.h

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

#ifndef COMPONENTS_WEB_PACKAGE_SIGNED_WEB_BUNDLES_SIGNED_WEB_BUNDLE_ID_H_
#define COMPONENTS_WEB_PACKAGE_SIGNED_WEB_BUNDLES_SIGNED_WEB_BUNDLE_ID_H_

#include <array>
#include <iosfwd>
#include <string_view>

#include "base/containers/span.h"
#include "base/functional/callback.h"
#include "base/types/expected.h"
#include "components/web_package/signed_web_bundles/ecdsa_p256_public_key.h"
#include "components/web_package/signed_web_bundles/ed25519_public_key.h"

namespace web_package {

// This class represents the ID of a Signed Web Bundle. There are currently two
// types of IDs:
//   * IDs used for development and testing (the so-called proxy mode);
//   * IDs based on an Ed25519 public key.
//   * IDs based on an ECDSA P-256 public key.
//
// IDs are base32-encoded (without padding), and then transformed to lowercase.
//
// New instances of this class can only be constructed via the static `Create`
// function, which will validate the format of the given ID. This means that you
// can assume that every instance of this class wraps a correctly formatted ID.
class SignedWebBundleId {};

}  // namespace web_package

#endif  // COMPONENTS_WEB_PACKAGE_SIGNED_WEB_BUNDLES_SIGNED_WEB_BUNDLE_ID_H_