Skip to content

Commit

Permalink
Make SigningState::sign() borrow the state instead of capturing it
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Oct 11, 2022
1 parent c8bef50 commit a93d9e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ed25519-compact"
version = "2.0.0"
version = "2.0.1"
authors = ["Frank Denis <github@pureftpd.org>"]
edition = "2018"
description = "A small, self-contained, wasm-friendly Ed25519 implementation"
Expand Down
2 changes: 1 addition & 1 deletion src/ed25519.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ impl SigningState {
}

/// Computes the signature and return it.
pub fn sign(self) -> Signature {
pub fn sign(&self) -> Signature {
let mut signature: [u8; 64] = [0; 64];
let r = ge_scalarmult_base(&self.nonce[0..32]);
signature[0..32].copy_from_slice(&r.to_bytes()[..]);
Expand Down

0 comments on commit a93d9e5

Please sign in to comment.