51Degrees Pipeline for PHP

fiftyone\pipeline\did\FodIdLayout Class Reference

Detailed Description

The byte offsets and lengths of the 51Did payload, for this package and its tests only.

The layout itself is published at https://github.com/51Degrees/specifications/blob/main/did-specification/identifier-layout.md which is the authority for what each byte holds, and https://github.com/51Degrees/specifications/blob/main/did-specification/package-surface.md lists what every 51Did package offers a caller.

A caller reads a 51Did through the named accessors on {

See also
FodId}, being {
FodId::getType()}, {
FodId::getUsage()}, {
FodId::isUsageIndirect()}, {
FodId::getLicenseId()} and {
FodId::getMatchKey()}, because every bit now has a name and masking the bits by hand is how the usage gets read the wrong way round. See {
Usage} for why.

Data Fields

const FLAGS_OFFSET = 0
 Byte offset of the Flags field within the payload.
const LICENSE_ID_OFFSET = 1
 Byte offset of the License Id field within the payload.
const LICENSE_ID_LENGTH = 4
 Byte length of the License Id field.
const MATCH_KEY_OFFSET = 5
 Byte offset of the match key field within the payload.
const MATCH_KEY_LENGTH = 32
 Byte length of the match key field (SHA-256).
const HEADER_LENGTH = self::MATCH_KEY_OFFSET
 Byte length of the header (Flags + License Id) common to every type.
const GUID_LENGTH = 16
 Byte length of the GUID match key carried by Random identifiers.
const RANDOM_PAYLOAD_LENGTH = self::HEADER_LENGTH + self::GUID_LENGTH
 Minimum byte length of a Random 51Did payload.
const PAYLOAD_LENGTH
 Minimum byte length of a Probabilistic or HashedEmail 51Did payload (Flags + License Id + match key).

Field Documentation

◆ PAYLOAD_LENGTH

const fiftyone\pipeline\did\FodIdLayout::PAYLOAD_LENGTH
Initial value:
= self::MATCH_KEY_OFFSET
+ self::MATCH_KEY_LENGTH

Minimum byte length of a Probabilistic or HashedEmail 51Did payload (Flags + License Id + match key).

Random payloads are shorter, see {

See also
FodIdLayout::RANDOM_PAYLOAD_LENGTH}.