Implement new uncompressed bytes for PublicKey

This commit is contained in:
Paul Hauner
2019-03-12 17:15:45 +11:00
parent c92f867cd8
commit 1b252c3f82
2 changed files with 19 additions and 6 deletions

View File

@@ -4,7 +4,7 @@ use std::fs::File;
use std::io::{Error, ErrorKind, Read, Write};
use std::path::Path;
pub const PUBLIC_KEY_BYTES_LEN: usize = 48;
pub const PUBLIC_KEY_BYTES_LEN: usize = 96;
pub const SECRET_KEY_BYTES_LEN: usize = 48;
pub const BATCH_SIZE: usize = 1_000; // ~15MB
@@ -26,7 +26,7 @@ impl KeypairsFile for Vec<Keypair> {
for keypair in keypair_batch {
buf.append(&mut keypair.sk.as_raw().as_bytes());
buf.append(&mut keypair.pk.as_raw().as_bytes());
buf.append(&mut keypair.pk.clone().as_uncompressed_bytes());
}
keypairs_file.write_all(&buf)?;