// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "services/network/trust_tokens/trust_token_client_data_canonicalization.h" #include "components/cbor/writer.h" #include "crypto/sha2.h" namespace network { namespace { const char kRedemptionTimestampKey[] = …; const char kRedeemingOriginKey[] = …; } // namespace // From the design doc: // // { // // “redemption-timestamp”’s value is of CBOR type “unsigned integer.” // “redemption-timestamp”: <Redemption timestamp, seconds past the Unix // epoch>, // // // “redeeming-origin”’s value is of CBOR type “text string.” // “redeeming-origin”: <Top-level origin at the time of redemption>, // }, std::optional<std::vector<uint8_t>> CanonicalizeTrustTokenClientDataForRedemption( base::Time redemption_timestamp, const url::Origin& top_frame_origin) { … } } // namespace network