digestLength static method
void
digestLength(})
Requires digestLength to be non-negative and within min/max, throws BuError otherwise.
Implementation
static void digestLength(
int digestLength, {
int? max,
int? min,
required String operation,
required String name,
}) {
if ((max != null && digestLength > max) ||
(min != null && digestLength < min) ||
digestLength.isNegative) {
throw CoreErrors.invalidOperationArguments(
operation,
name: name,
reason: 'Invalid digest length.',
);
}
// if (!allowed.contains(data.length)) {
// }
}