validateFixedLengthBytes static method
Implementation
static List<int> validateFixedLengthBytes(
{required List<int> bytes,
required int length,
bool unmodifiable = true,
String? objectName}) {
if (bytes.length != length) {
throw ADAPluginException("Invalid ${objectName ?? 'hash'} length.",
details: {"Excepted": length, "length": bytes.length});
}
return BytesUtils.toBytes(bytes, unmodifiable: unmodifiable);
}