# `Grizzly.ZWave.CommandClasses.UserCredential`
[🔗](https://github.com/smartrent/grizzly/blob/v9.1.2/lib/grizzly/zwave/command_classes/user_credential.ex#L1)

User Credential command class

# `credential_capabilities`

```elixir
@type credential_capabilities() :: %{
  learn_supported?: boolean(),
  supported_slots: pos_integer(),
  min_length: pos_integer(),
  max_length: pos_integer(),
  recommended_learn_timeout: non_neg_integer(),
  learn_steps: non_neg_integer(),
  hash_max_length: non_neg_integer()
}
```

# `credential_learn_operation`

```elixir
@type credential_learn_operation() :: :add | :modify
```

# `credential_operation`

```elixir
@type credential_operation() :: :add | :modify | :delete
```

# `credential_rule`

```elixir
@type credential_rule() :: :single | :dual | :triple
```

# `credential_type`

```elixir
@type credential_type() ::
  :none
  | :pin_code
  | :password
  | :rfid
  | :ble
  | :nfc
  | :uwb
  | :eye_biometric
  | :face_biometric
  | :finger_biometric
  | :hand_biometric
  | :unspecified_biometric
```

# `modifier_type`

```elixir
@type modifier_type() :: :dne | :unknown | :zwave | :local | :other
```

# `user_operation`

```elixir
@type user_operation() :: :add | :modify | :delete
```

# `user_type`

```elixir
@type user_type() ::
  :general
  | :programming
  | :non_access
  | :duress
  | :disposable
  | :expiring
  | :remote_only
```

# `decode_admin_pin_code_set_status`

```elixir
@spec decode_admin_pin_code_set_status(byte()) :: atom()
```

Decodes the status field in an Admin Pin Code Report command

# `decode_association_set_status`

```elixir
@spec decode_association_set_status(byte()) :: atom()
```

Decodes status field in a User Credential Association Report command

# `decode_credential_data`

```elixir
@spec decode_credential_data(credential_type(), binary()) :: binary()
```

Decodes credential data from a binary based on its type.

# `decode_credential_operation`

```elixir
@spec decode_credential_operation(byte()) :: credential_operation() | :unknown
```

Decodes credential operation from a byte value

# `decode_credential_rule`

```elixir
@spec decode_credential_rule(byte()) :: credential_rule() | :unknown
```

Decodes a credential rule from a byte value

# `decode_credential_type`

```elixir
@spec decode_credential_type(byte()) :: credential_type() | :unknown
```

Decodes a credential type from a byte value

# `decode_modifier_type`

```elixir
@spec decode_modifier_type(byte()) :: modifier_type() | :unknown
```

Decodes modifier type from a byte value

# `decode_user_operation`

```elixir
@spec decode_user_operation(byte()) :: user_operation() | :unknown
```

Decodes a user operation from a byte value

# `decode_user_type`

```elixir
@spec decode_user_type(byte()) :: user_type() | :unknown
```

Decodes a user type from a byte value

# `encode_admin_pin_code_set_status`

```elixir
@spec encode_admin_pin_code_set_status(status :: atom()) :: byte()
```

Encodes the status field in an Admin Pin Code Report command

# `encode_association_set_status`

```elixir
@spec encode_association_set_status(status :: atom()) :: byte()
```

Encodes status field in a User Credential Association Report command

# `encode_credential_data`

```elixir
@spec encode_credential_data(credential_type(), binary()) :: binary()
```

Encodes credential data to a binary based on its type.

Passwords are encoded as UTF-16 strings, while other types are left as-is.

# `encode_credential_operation`

```elixir
@spec encode_credential_operation(credential_operation()) :: byte()
```

Encodes credential operation to a byte value

# `encode_credential_rule`

```elixir
@spec encode_credential_rule(credential_rule()) :: byte()
```

Encodes a credential rule to a byte value

# `encode_credential_type`

```elixir
@spec encode_credential_type(credential_type()) :: byte()
```

Encodes a credential type to a byte value

# `encode_modifier_type`

```elixir
@spec encode_modifier_type(modifier_type()) :: byte()
```

Encodes modifier type to a byte value

# `encode_user_operation`

```elixir
@spec encode_user_operation(user_operation()) :: byte()
```

Encodes a user operation to a byte value

# `encode_user_type`

```elixir
@spec encode_user_type(user_type()) :: byte()
```

Encodes a user type to a byte value

---

*Consult [api-reference.md](api-reference.md) for complete listing*
