validateCeremonyId function
Validates ceremonyId for use in ceremonies and durable objects.
Throws InvalidParams when invalid.
Implementation
void validateCeremonyId(Uint8List ceremonyId) {
if (ceremonyId.length != ceremonyIdLength) {
throw InvalidParams(
'ceremonyId must be exactly $ceremonyIdLength bytes (got ${ceremonyId.length})',
);
}
if (_isAllZero(ceremonyId)) {
throw InvalidParams('ceremonyId must not be all zero');
}
}