DRY up EntropySource implementation
authorJeffrey Czyz <jkczyz@gmail.com>
Wed, 3 Jan 2024 21:41:00 +0000 (15:41 -0600)
committerJeffrey Czyz <jkczyz@gmail.com>
Tue, 16 Jan 2024 02:12:37 +0000 (20:12 -0600)
commit8deac898ab7276ed633a8233e81ffef924b21e76
tree287d4c84938b0e1ee6d4bc2dc460e2e2f62bc937
parent911ed6dafcc3eca3a86b9bebc57489795ad44876
DRY up EntropySource implementation

The ChaCha20-based EntropySource implementation is duplicated within the
sign module. Refactor those into a RandomBytes implementation so that it
may be reused both there. Also useful as a standalone EntropySource
implementation for tests where an independent EntropySource is needed to
ensure that backwards-compatibility testing is not broken.
lightning/src/sign/mod.rs