diff options
Diffstat (limited to 'src/hash_chain.rs')
| -rw-r--r-- | src/hash_chain.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/hash_chain.rs b/src/hash_chain.rs index 0fe2c1d..f21b1d2 100644 --- a/src/hash_chain.rs +++ b/src/hash_chain.rs @@ -26,7 +26,7 @@ impl<T: Encode> HashChain<T> { this } - fn push(&mut self, data: T) { + pub fn push(&mut self, data: T) { let prev_hash = self .data .last() @@ -40,7 +40,7 @@ impl<T: Encode> HashChain<T> { // TODO: make try_last that does same as this but returns Err() if it's not the // last one and/or refuse to insert - fn insert(&mut self, data: T, base_hash: &Vec<u8>) { + pub fn insert(&mut self, data: T, base_hash: &Vec<u8>) { let pos = self .data .iter() @@ -53,7 +53,7 @@ impl<T: Encode> HashChain<T> { self.rehash(&base_hash); } - fn verify(&self, until_hash: &[u8]) -> bool { + pub fn verify(&self, until_hash: &[u8]) -> bool { let pos = self .data .iter() @@ -68,7 +68,7 @@ impl<T: Encode> HashChain<T> { }) } - fn rehash(&mut self, from_hash: &[u8]) { + pub fn rehash(&mut self, from_hash: &[u8]) { let pos = self .data .iter() |
