VerificationState


enum VerificationState : Enum


Verification state of a contact key.

The state parameter is the integer that will be used for the Contact Keys client IPCs that update the verification state of a key.

Summary

Enum Values

UNVERIFIED

Unverified state of a contact end to end encrypted key.

VERIFICATION_FAILED

Failed verification state of a contact end to end encrypted key.

VERIFIED

Verified state of a contact end to end encrypted key.

Public companion functions

VerificationState
fromState(state: Int)

Returns the VerificationState corresponding to the given state integer.

VerificationState?

Returns the least verified VerificationState of a list of VerificationState.

Public functions

VerificationState
valueOf(value: String)

Returns the enum constant of this type with the specified name.

Array<VerificationState>

Returns an array containing the constants of this enum type, in the order they're declared.

Public properties

EnumEntries<VerificationState>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Int

Enum Values

UNVERIFIED

val VerificationState.UNVERIFIEDVerificationState

Unverified state of a contact end to end encrypted key.

This is the default state for newly-inserted keys and does not represent an error state.

VERIFICATION_FAILED

val VerificationState.VERIFICATION_FAILEDVerificationState

Failed verification state of a contact end to end encrypted key.

For local verifications, a verification fails when a QR code is scanned, and that QR code includes the corresponding ownerPackageName and accountId but none of the keys for this ownerPackageName and accountId have the corresponding deviceId and keyValue.

VERIFIED

val VerificationState.VERIFIEDVerificationState

Verified state of a contact end to end encrypted key.

For local verifications, a key is verified when the most recent scanned QR code that included the key's ownerPackageName and accountId also included the key's deviceId and keyValue.

Public companion functions

fromState

fun fromState(state: Int): VerificationState

Returns the VerificationState corresponding to the given state integer.

Throws if state is not a valid representation of a VerificationState.

leastVerifiedFrom

fun leastVerifiedFrom(states: List<VerificationState>?): VerificationState?

Returns the least verified VerificationState of a list of VerificationState.

This method should be used to decide which state should be displayed to the user for a set of keys.

The least verified state is VERIFICATION_FAILED, then UNVERIFIED, then VERIFIED.

Returns null if states is empty or null.

Public functions

valueOf

fun valueOf(value: String): VerificationState

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Throws
kotlin.IllegalArgumentException

if this enum type has no constant with the specified name

values

fun values(): Array<VerificationState>

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.

Public properties

entries

val entriesEnumEntries<VerificationState>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

This method may be used to iterate over the enum entries.

state

val stateInt