Shared argument checks for API validation wrappers. Throws BuError on bad caller input.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Static Methods
-
call<
T> (String op, T run()) → T -
Runs
runfor operationop, rethrows BuError/CryptoException, wraps the rest inCryptoException. -
digestLength(
int digestLength, {int? max, int? min, required String operation, required String name}) → void -
Requires
digestLengthto be non-negative and withinmin/max, throws BuError otherwise. -
length(
List< int> data, int expected, {required String operation, required String name}) → void -
Requires
datato be exactlyexpectedbytes, throws BuError otherwise. -
levelMlDsa(
int level, String operation) → void -
Requires ML-DSA
levelto be 44, 65, or 87, throws BuError otherwise. -
nonEmpty(
List< int> data, {required String operation, required String name}) → void -
Requires
datato be non-empty, throws BuError if empty. -
oneOfLengths(
List< int> data, List<int> allowed, {required String operation, required String name}) → void -
Requires
datalength to be one ofallowed, throws BuError otherwise.