Skip to content

Commit 28a3b5d

Browse files
committed
Add constructor for StorableBuilder
1 parent c5564e7 commit 28a3b5d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/util/storable_builder.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ pub struct StorableBuilder<T: EntropySource> {
1212
entropy_source: T,
1313
}
1414

15+
impl<T: EntropySource> StorableBuilder<T> {
16+
/// Constructs a new instance.
17+
pub fn new(data_encryption_key: [u8; 32], entropy_source: T) -> StorableBuilder<T> {
18+
Self { data_encryption_key, entropy_source }
19+
}
20+
}
21+
1522
/// A trait representing a source for generating entropy/randomness.
1623
pub trait EntropySource {
1724
/// Fills a buffer with random bytes.

0 commit comments

Comments
 (0)