Documentation
¶
Overview ¶
Package errors provides crypto-specific error values shared across go-service crypto helpers.
The package centralizes sentinel errors that callers can compare with `errors.Is` regardless of which concrete crypto helper produced them.
Current sentinels include:
- ErrInvalidMatch: a verification operation failed because the provided signature, MAC, or hash did not match the message.
- ErrInvalidKeyType: key material decoded successfully, but the contained key algorithm did not match what the caller expected.
These sentinels are intentionally small and reusable so higher-level packages can add context by wrapping them without losing comparability.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidKeyType = errors.New("crypto: invalid key type")
ErrInvalidKeyType indicates that parsed key material was valid, but not of the key type expected by the caller.
It is used by key-loading helpers that only support a specific algorithm (for example Ed25519) when the provided data decodes successfully as some other key type.
var ErrInvalidMatch = errors.New("crypto: invalid match")
ErrInvalidMatch indicates that a cryptographic verification check failed.
It is used by verification helpers (for example signature verifiers) to report that a provided signature/hash does not match the expected value for the input message.
Functions ¶
This section is empty.
Types ¶
This section is empty.