mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-17 21:08:32 +00:00
Update SecretKey to 32 bytes (#1072)
* Update SecretKey to 32 bytes Signed-off-by: Kirk Baird <baird.k@outlook.com> * Stop test from padding to 48 bytes Signed-off-by: Kirk Baird <baird.k@outlook.com> * Fix keypair file secret key length Signed-off-by: Kirk Baird <baird.k@outlook.com>
This commit is contained in:
@@ -23,7 +23,6 @@ impl Case for BlsSign {
|
||||
// Convert private_key and message to required types
|
||||
let mut sk = hex::decode(&self.input.privkey[2..])
|
||||
.map_err(|e| Error::FailedToParseTest(format!("{:?}", e)))?;
|
||||
pad_to_48(&mut sk);
|
||||
let sk = SecretKey::from_bytes(&sk).unwrap();
|
||||
let msg = hex::decode(&self.input.message[2..])
|
||||
.map_err(|e| Error::FailedToParseTest(format!("{:?}", e)))?;
|
||||
@@ -37,10 +36,3 @@ impl Case for BlsSign {
|
||||
compare_result::<Vec<u8>, Vec<u8>>(&Ok(signature.as_bytes()), &Some(decoded))
|
||||
}
|
||||
}
|
||||
|
||||
// Increase the size of an array to 48 bytes
|
||||
fn pad_to_48(array: &mut Vec<u8>) {
|
||||
while array.len() < 48 {
|
||||
array.insert(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user