let SharedSecret::derive_key take a reference instead
This commit is contained in:
parent
0f0e0f16b9
commit
78f077b3b4
1 changed files with 2 additions and 2 deletions
|
|
@ -76,8 +76,8 @@ impl From<U256> for Secret {
|
||||||
pub struct SharedSecret([u8; 32]);
|
pub struct SharedSecret([u8; 32]);
|
||||||
|
|
||||||
impl SharedSecret {
|
impl SharedSecret {
|
||||||
pub fn derive_key<T: Fn([u8; 32]) -> [u8; 32]>(self, deriver: T) -> [u8; 32] {
|
pub fn derive_key<T: Fn(&[u8; 32]) -> [u8; 32]>(self, deriver: T) -> [u8; 32] {
|
||||||
deriver(self.0)
|
deriver(&self.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue