diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2023-02-16 11:21:35 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2023-02-16 16:20:30 +0100 |
commit | 0bba1cc38a87b9f7b0a97854a3a6f2503799dcc7 (patch) | |
tree | c53773c7f71e8088a942bcb91c5fe9e5bb7506ed /openpgp/src/lib.rs | |
parent | 95d5ef334352c7dfa2a915c52fd939c3eb2117db (diff) |
openpgp: Fix salt generation in impl Arbitrary for S2K.
Diffstat (limited to 'openpgp/src/lib.rs')
-rw-r--r-- | openpgp/src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/openpgp/src/lib.rs b/openpgp/src/lib.rs index d6521e4f..38d2b9e4 100644 --- a/openpgp/src/lib.rs +++ b/openpgp/src/lib.rs @@ -374,4 +374,11 @@ mod arbitrary_helper { panic!() } } + + pub(crate) fn arbitrary_slice<T>(g: &mut Gen, s: &mut [T]) + where + T: Arbitrary, + { + s.iter_mut().for_each(|p| *p = Arbitrary::arbitrary(g)); + } } |