SealedBox.fromCombined constructor
Splits ciphertext || tag with a tagLength-byte tag (16 by default).
Implementation
factory SealedBox.fromCombined(List<int> combined, {int tagLength = 16}) {
if (combined.length < tagLength) {
throw ArgumentError.value(
combined.length,
'combined',
'shorter than the $tagLength byte tag',
);
}
final split = combined.length - tagLength;
return SealedBox(
Uint8List.fromList(combined.sublist(0, split)),
Uint8List.fromList(combined.sublist(split)),
);
}