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

edition = "2023";

package cast_receiver;

option optimize_for = LITE_RUNTIME;

option features.field_presence = IMPLICIT;
option java_multiple_files = true;
option java_package = "com.google.pixel.exo.proto";
option java_outer_classname = "UidProto";

// The Unique Identitifer of Exo endpoints.
// Next ID: 3
message UID {
  // The possible types of UID, as defined by their cryptographic generation.
  // Next ID: 3
  enum Type {
    UNKNOWN = 0;

    // Elliptic curve 2^255 - 19.
    CURVE25519 = 1;

    // A random number generated by Java's SecureRandom
    SIMPLE_RANDOM = 2;
  }

  // The raw bytes of this UID. Should be interpreted according to the Type
  // specified.
  bytes id = 1;

  // The type of this UID. This defines how the bytes in `Id` are to be
  // interpreted.
  Type type = 2;
}
