HmacSigner class final
Signs a COSE_Mac0 with a shared secret of at least 32 random bytes.
The secret lives in this process's memory: for service credentials and tests, never for an end user's device. The object keeps its copy (secret) for as long as it is reachable, and Dart cannot wipe memory, so drop the signer once the ClientEnvelope is built. The Rust side wipes its own copy when the envelope is dropped. secret is public only because the backends, in other libraries, read it.
Throws ArgumentError if alg is not an HMAC algorithm.
- Inheritance
-
- Object
- CoseSigner
- HmacSigner
Constructors
- HmacSigner(CoseAlg alg, Uint8List secret)
-
algmust be CoseAlg.hmac256x64 or CoseAlg.hmac256x256.
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited