summaryrefslogtreecommitdiff
path: root/src/sign.rs
diff options
context:
space:
mode:
authorStuart Stock <stuart@int08h.com>2018-10-14 21:14:55 -0500
committerStuart Stock <stuart@int08h.com>2018-10-14 21:14:55 -0500
commit1b8ff27b86392acdd0596d8ed9ad2b0b72691042 (patch)
tree41a8b0b153f6c8c3fcb4de0520443763e5832e1a /src/sign.rs
parentac71e92f11d91cca566dd38c78bcdef2db6c1811 (diff)
downloadroughenough-1b8ff27b86392acdd0596d8ed9ad2b0b72691042.zip
implement gcp decrypt
Diffstat (limited to 'src/sign.rs')
-rw-r--r--src/sign.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sign.rs b/src/sign.rs
index ead5a4c..5fca564 100644
--- a/src/sign.rs
+++ b/src/sign.rs
@@ -30,6 +30,8 @@ use self::untrusted::Input;
use std::fmt;
use std::fmt::Formatter;
+const INITIAL_BUF_SIZE: usize = 1024;
+
/// A multi-step (init-update-finish) interface for verifying an Ed25519 signature
#[derive(Debug)]
pub struct Verifier<'a> {
@@ -41,7 +43,7 @@ impl<'a> Verifier<'a> {
pub fn new(pubkey: &'a [u8]) -> Self {
Verifier {
pubkey: Input::from(pubkey),
- buf: Vec::with_capacity(256),
+ buf: Vec::with_capacity(INITIAL_BUF_SIZE),
}
}
@@ -80,7 +82,7 @@ impl Signer {
let seed_input = Input::from(seed);
Signer {
key_pair: Ed25519KeyPair::from_seed_unchecked(seed_input).unwrap(),
- buf: Vec::with_capacity(256),
+ buf: Vec::with_capacity(INITIAL_BUF_SIZE),
}
}