crypto: impl PartialEq and Clone for Nullifier

This commit is contained in:
ghassmo
2021-10-25 11:34:31 +03:00
parent 91aebde3c0
commit d5eb67ad56

View File

@@ -5,6 +5,8 @@ use crate::{
serial::{Decodable, Encodable},
};
#[derive(Debug, Clone)]
pub struct Nullifier {
pub repr: [u8; 32],
}
@@ -28,3 +30,9 @@ impl Decodable for Nullifier {
})
}
}
impl PartialEq for Nullifier {
fn eq(&self, other: &Self) -> bool {
self.repr == other.repr
}
}