David PHAM-VAN

Use secure random number generator for document ID generation

... ... @@ -9,6 +9,7 @@
- Add support for creating PDF/A 3b [ilaurillard]
- Add helper functions to replace text styles and cell content [Brian Kayfitz]
- Fix TextStyle merge decoration [AtlasAutocode]
- Use secure random number generator for document ID generation
## 3.11.1
... ...
... ... @@ -177,7 +177,7 @@ class PdfDocument {
/// Generates the document ID
Uint8List get documentID {
if (_documentID == null) {
final rnd = math.Random();
final rnd = math.Random.secure();
_documentID = Uint8List.fromList(sha256
.convert(DateTime.now().toIso8601String().codeUnits +
List<int>.generate(32, (_) => rnd.nextInt(256)))
... ...