Skip to content

Commit 0215fc5

Browse files
committed
derive clone for hasher
1 parent db5f45b commit 0215fc5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/encoder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ pub struct SdObjectEncoder<H: Hasher> {
3333
/// Transforms a JSON object into an SD-JWT object by substituting selected values
3434
/// with their corresponding disclosure digests.
3535
#[cfg(feature = "sha")]
36+
#[derive(Debug, Clone)]
3637
pub struct SdObjectEncoder<H: Hasher = Sha256Hasher> {
3738
/// The object in JSON format.
3839
object: Map<String, Value>,

src/hasher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub trait Hasher: Sync + Send {
3636
}
3737

3838
/// An implementation of [`Hasher`] that uses the `sha-256` hash function.
39-
#[derive(Default)]
39+
#[derive(Default, Clone, Copy)]
4040
#[cfg(feature = "sha")]
4141
pub struct Sha256Hasher;
4242

0 commit comments

Comments
 (0)