nupp.mac.spi
Implementation interfaces for keyed authentication algorithm catalogs.
The facade chooses the unique highest priority during initialization. Its entries override matching built-ins and may add names; empty discovery uses the built-in catalog. Descriptors are retained once, so context operations perform no SPI resolution. Importing this declaration creates no keyed or storage state.
Algorithm names match their map keys. digestSize is a positive fixed byte count; hmac-sha256 always produces 32 bytes. create receives the retained descriptor and a raw-byte key and returns independently owned State using the shared digest protocol. Updates must not retain input views. finish writes exactly digestSize bytes without consuming state; the facade closes state on success and failure. Cleanup consumes ownership without suspension. Providers define private records satisfying the canonical State interface rather than substituting its identity.
Module contents
Types
| Type | Kind | Description |
|---|---|---|
Algorithm | interface | Fixed-output authentication algorithm and a factory for keyed state. |
Provider | interface | A selectable catalog of keyed algorithm descriptors. |
Types#
Algorithminterface#
interface Algorithm ...Fixed-output authentication algorithm and a factory for keyed state.
Members
| Name | Kind | Description |
|---|---|---|
name | field | Canonical algorithm name matching the catalog key. |
digestSize | field | Fixed output size in bytes. |
create | method | Creates independent owned state from the raw-byte secret key. |
Providerinterface#
interface Provider ...A selectable catalog of keyed algorithm descriptors.
Members
| Name | Kind | Description |
|---|---|---|
priority | field | |
algorithms | field | Algorithms keyed by canonical name; additional descriptor fields are allowed. |