nupp.runtime.services.checksum
Canonical nupp.checksum API 1 provider catalog.
Setup imports service here and selects an implementation before requiring nupp.checksum. Importing this declaration does not load storage or algorithms. A provider supplies an algorithms map keyed by canonical algorithm name. Each descriptor's name agrees with its key, and each create returns independent owned state. An explicitly selected catalog replaces matching built-in algorithms and may add names; other built-in algorithms remain available. Without selection the facade uses the built-in catalog. Discovery order never selects a provider.
The facade validates and retains descriptors while requiring the module. Lookup, listing, and context creation then use cached descriptors without SPI resolution. Provider state processes chunks incrementally and retains neither input nor output spans. Cleanup consumes state without suspension. Reuse these canonical State and Algorithm identities, including ownership and borrowing signatures. value returns a non-consuming uint64 snapshot; width specifies its meaningful bits from 1 through 64. Standard names retain their standard widths and exact CRC parameters. Checksums detect corruption and provide no authentication.
Module contents
Types
| Type | Kind | Description |
|---|---|---|
Algorithm | interface | Immutable algorithm identity, output metadata, and a factory for fresh state. |
Provider | interface | A selectable implementation catalog. |
State | interface | Independent incremental state; close consumes its ownership without suspension. |
Values
| Value | Kind | Description |
|---|---|---|
service | variable | Select during setup, before the checksum facade loads. |
Types#
Algorithminterface#
interface Algorithm
readonly name: string
readonly width: integer
create: function(self: Algorithm): State
endImmutable algorithm identity, output metadata, and a factory for fresh state.
Methods
create#
Creates independent owned state; self is the retained descriptor.
Arguments
| Name | Type | Description |
|---|---|---|
self | Algorithm |
Returns
| Type | Description |
|---|---|
State |
Fields
Providerinterface#
interface Provider
readonly algorithms: {[string]: Algorithm}
endA selectable implementation catalog. Extra descriptor members are permitted.
Fields
Stateinterface#
affine interface State is nupp.Closeable
terminal close: function(takes self: State): nil
update: function(exclusive self: State, borrows bytes: ByteSpan): nil
value: function(self: State): uint64
endIndependent incremental state; close consumes its ownership without suspension.
Methods
close#
Releases all state resources.
Arguments
| Name | Type | Description |
|---|---|---|
takes self | State |
Returns
| Type | Description |
|---|---|
nil |
Values#
servicevariable#
Select during setup, before the checksum facade loads.