pub struct Key { /* private fields */ }
41
42
43
44
45
46
pub fn subkey(&self, n: usize) -> Key {
let mut vec = self.keypair.secret.to_bytes().to_vec();
vec.append(&mut n.to_le_bytes().to_vec());
let hash = util::hash(&vec);
Key::from_secret_key_bytes(&hash)
}
Formats the value using the given formatter.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.