Skip to content

Commit

Permalink
Remove remaining static lifetimes on signing contexts.
Browse files Browse the repository at this point in the history
  • Loading branch information
wilfred-centrality committed Jul 8, 2019
1 parent fa0a6f7 commit c2ea7cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ impl SecretKey {
}

/// Sign a message with this `SecretKey`.
pub fn sign_simple(&self, ctx: &'static [u8], msg: &[u8], public_key: &PublicKey) -> Signature
pub fn sign_simple(&self, ctx: &[u8], msg: &[u8], public_key: &PublicKey) -> Signature
{
let t = SigningContext::new(ctx).bytes(msg);
self.sign(t,public_key)
Expand Down Expand Up @@ -210,7 +210,7 @@ impl PublicKey {
}

/// Verify a signature by this public key on a message.
pub fn verify_simple(&self, ctx: &'static [u8], msg: &[u8], signature: &Signature)
pub fn verify_simple(&self, ctx: &[u8], msg: &[u8], signature: &Signature)
-> SignatureResult<()>
{
let t = SigningContext::new(ctx).bytes(msg);
Expand Down Expand Up @@ -424,7 +424,7 @@ impl Keypair {
}

/// Sign a message with this keypair's secret key.
pub fn sign_simple(&self, ctx: &'static [u8], msg: &[u8]) -> Signature
pub fn sign_simple(&self, ctx: &[u8], msg: &[u8]) -> Signature
{
self.secret.sign_simple(ctx, msg, &self.public)
}
Expand Down Expand Up @@ -462,7 +462,7 @@ impl Keypair {
}

/// Verify a signature by keypair's public key on a message.
pub fn verify_simple(&self, ctx: &'static [u8], msg: &[u8], signature: &Signature) -> SignatureResult<()>
pub fn verify_simple(&self, ctx: &[u8], msg: &[u8], signature: &Signature) -> SignatureResult<()>
{
self.public.verify_simple(ctx, msg, signature)
}
Expand Down

0 comments on commit c2ea7cc

Please sign in to comment.