summaryrefslogtreecommitdiff
path: root/src/sign.rs
diff options
context:
space:
mode:
authorStuart Stock <stuart@int08h.com>2017-07-03 17:18:08 -0500
committerStuart Stock <stuart@int08h.com>2017-07-03 17:18:35 -0500
commit3a2e9ecc0b3a91457f654e2dbf0b13097f18bfcf (patch)
tree6dd4ac5daa404cc7cb04c903e562ccd075fb736e /src/sign.rs
parent0e955f89eca384ad71721b2842412235e0aac472 (diff)
downloadroughenough-3a2e9ecc0b3a91457f654e2dbf0b13097f18bfcf.zip
add docstrings and cleanup whitespace
Diffstat (limited to 'src/sign.rs')
-rw-r--r--src/sign.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sign.rs b/src/sign.rs
index f865f2a..326ebbb 100644
--- a/src/sign.rs
+++ b/src/sign.rs
@@ -1,6 +1,9 @@
//!
//! Ed25519 signing and verification
//!
+//! `Ring` does not provide a multi-step (init-update-finish) interface
+//! for Ed25519 signatures. `Verifier` and `Signer` attempt to provide this
+//! missing multi-step api.
extern crate ring;
extern crate untrusted;
@@ -10,6 +13,8 @@ use self::ring::signature::Ed25519KeyPair;
use self::untrusted::Input;
+/// A multi-step (init-update-finish) interface for verifying an
+/// Ed25519 signature
#[derive(Debug)]
pub struct Verifier<'a> {
pubkey: Input<'a>,
@@ -40,6 +45,8 @@ impl<'a> Verifier<'a> {
}
}
+/// A multi-step (init-update-finish) interface for creating an
+/// Ed25519 signature
pub struct Signer {
key_pair: Ed25519KeyPair,
buf: Vec<u8>,