diff options
-rw-r--r-- | src/sign.rs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/sign.rs b/src/sign.rs index ec77dc5..bd141b0 100644 --- a/src/sign.rs +++ b/src/sign.rs @@ -12,11 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -//! Ed25519 signing and verification //! -//! `Ring` does not provide a multi-step (init-update-finish) interface -//! for Ed25519 signatures. `Verifier` and `Signer` provide this -//! missing multi-step api. +//! A multi-step (init-update-finish) interface for Ed25519 signing and verification +//! extern crate hex; extern crate ring; @@ -24,16 +22,15 @@ extern crate untrusted; use self::ring::signature; use self::ring::signature::Ed25519KeyPair; - use self::ring::rand; use self::ring::rand::SecureRandom; + use self::untrusted::Input; use std::fmt; use std::fmt::Formatter; -/// A multi-step (init-update-finish) interface for verifying an -/// Ed25519 signature +/// A multi-step (init-update-finish) interface for verifying an Ed25519 signature #[derive(Debug)] pub struct Verifier<'a> { pubkey: Input<'a>, @@ -64,8 +61,7 @@ impl<'a> Verifier<'a> { } } -/// A multi-step (init-update-finish) interface for creating an -/// Ed25519 signature +/// A multi-step (init-update-finish) interface for creating an Ed25519 signature pub struct Signer { key_pair: Ed25519KeyPair, buf: Vec<u8>, |