# Class: KeyID

## KeyID()

Implementation of type key id

RFC4880 3.3: A Key ID is an eight-octet scalar that identifies a key. Implementations SHOULD NOT assume that Key IDs are unique. The section "Enhanced Key Formats" below describes how Key IDs are formed.

## Constructor

#### new KeyID()

Source:
  - type/keyid.js, line 35

### Methods

#### equals(keyID, matchWildcard)

Checks equality of Key ID's

##### Parameters:

Name | Type | Default | Description
--- | --- | --- | ---
`keyID` | KeyID |  |
`matchWildcard` | Boolean | false | Indicates whether to check if either keyID is a wildcard

Source:
  - type/keyid.js, line 68

#### isNull() → {Boolean}

Checks to see if the Key ID is unset

Source:
  - type/keyid.js, line 76

##### Returns:

True if the Key ID is null.

Type
  Boolean

#### isWildcard() → {Boolean}

Checks to see if the Key ID is a "wildcard" Key ID (all zeros)

Source:
  - type/keyid.js, line 84

##### Returns:

True if this is a wildcard Key ID.

Type
  Boolean

#### read(bytes)

Parsing method for a key id

##### Parameters:

Name | Type | Description
--- | --- | ---
`bytes` | Uint8Array | Input to read the key id from

Source:
  - type/keyid.js, line 43

#### toHex() → {String}

Returns the Key ID represented as a hexadecimal string

Source:
  - type/keyid.js, line 59

##### Returns:

Key ID as a hexadecimal string.

Type
  String

#### write() → {Uint8Array}

Serializes the Key ID

Source:
  - type/keyid.js, line 51

##### Returns:

Key ID as a Uint8Array.

Type
  Uint8Array