mirror of
https://github.com/mii443/lamport_sigs.rs.git
synced 2025-08-22 15:05:49 +00:00
Specify the capacity of the signature vector in PrivateKey::sign
This commit is contained in:
@ -123,7 +123,8 @@ impl <T: Digest + Clone> PrivateKey<T> {
|
||||
self.digest.result(data_hash.as_mut_slice());
|
||||
self.digest.reset();
|
||||
|
||||
let mut signature = Vec::new();
|
||||
let signature_len = data_hash.len() * 8;
|
||||
let mut signature = Vec::with_capacity(signature_len);
|
||||
|
||||
for i in 0..data_hash.len() {
|
||||
let byte = data_hash[i];
|
||||
|
Reference in New Issue
Block a user