CryptoBackendConformanceTest

The conformance suite of a CryptoBackend: its supports answers hold (CapabilityInvariant, docs/adr/0001-crypto-capabilities.md) for every AEAD, key type, signature algorithm, KEM and hash, and the capability report goes to the test output. A backend's tests extend it in their common source set, so it runs on every target the backend builds for:

class MyBackendConformanceTest : CryptoBackendConformanceTest() {
override fun createBackend(): CryptoBackend = MyBackend(DefaultCryptoBackend())
}

A decorator that adds algorithms and forgets to override the matching supports members fails here: its delegate answers no for operations the decorator runs. Each test asks createBackend for a backend of its own, so memoized answers start empty.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Link copied to clipboard

SHA-256, SHA-384 and their HMACs where supported; SHAKE256 always.

Link copied to clipboard
Link copied to clipboard

Prints the capability report, one line per kind of question starting with CapabilityReport.LINE_PREFIX, which the build can copy into its log for each target.