E2eeBaseKeyParcelable


interface E2eeBaseKeyParcelable : Parcelable

Known direct subclasses
E2eeAccountContactKeyParcelable

Represents an account key, a client-owned key used for end-to-end encryption tied to a given app-specific account, which may be tied to zero, one or more contacts.

E2eeContactKeyParcelable

Represents an E2eeBaseKeyParcelable tied to a single contact.

E2eeSelfKeyParcelable

Represents an E2eeBaseKeyParcelable tied to the current user.


Interface class representing the shared data for all types of keys handled by the Key Verifier.

Summary

Public functions

String

Returns the account ID for the key.

String

Returns the device ID, an opaque identifier for a unique key, used to differentiate between multiple keys for the same account ID.

ByteArray<Byte>?

Returns the public key as opaque bytes for this account/device, or null if the value has been redacted.

String

Returns the name of the package that owns the key.

Int

Returns the remote verification state of the key.

Long

Returns the timestamp as the number of milliseconds since the Unix epoch.

Public functions

getAccountId

fun getAccountId(): String

Returns the account ID for the key. This could be a phone number, email address, user handle or any value that meaningfully represents a unique user's account.

This value may be displayed during verification to pick the right account and should be meaningful to the user.

The value should also be consistent across users. For instance, if the system uses phone numbers to represent accounts but lets users create aliases to share with contacts to hide the phone number, the (globally-unique) alias should be used as the account ID.

getDeviceId

fun getDeviceId(): String

Returns the device ID, an opaque identifier for a unique key, used to differentiate between multiple keys for the same account ID. The device ID may refer to a physical device or one of several keys used for the same device.

The device ID need not be unique across accounts for a given app. For instance, constants may be used if every account has a fixed set of keys.

The device ID is redacted if the client that requested it is not the one that owns the key (as indicated by getOwnerPackageName)

getKeyValue

fun getKeyValue(): ByteArray<Byte>?

Returns the public key as opaque bytes for this account/device, or null if the value has been redacted.

The key value is redacted if the client that requested it is not the one that owns the key (as indicated by getOwnerPackageName)

getOwnerPackageName

fun getOwnerPackageName(): String

Returns the name of the package that owns the key.

getRemoteVerificationState

fun getRemoteVerificationState(): Int

Returns the remote verification state of the key.

See com.google.android.gms.contactkeys.constants.VerificationState for more details.

getTimeUpdated

fun getTimeUpdated(): Long

Returns the timestamp as the number of milliseconds since the Unix epoch.

The returned value is redacted if the client that requested it is not the one that owns the key (as indicated by getOwnerPackageName)