Merge pull request #96 from Arnaz87/master

Drop the static lifetime for context in sign_prehashed
This commit is contained in:
isis agora lovecruft 2019-10-07 20:06:48 +00:00 committed by GitHub
commit 29622ec10b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -360,7 +360,7 @@ impl Keypair {
pub fn sign_prehashed<D>(
&self,
prehashed_message: D,
context: Option<&'static [u8]>,
context: Option<&[u8]>,
) -> Signature
where
D: Digest<OutputSize = U64>,

View file

@ -454,11 +454,11 @@ impl ExpandedSecretKey {
///
/// [rfc8032]: https://tools.ietf.org/html/rfc8032#section-5.1
#[allow(non_snake_case)]
pub fn sign_prehashed<D>(
pub fn sign_prehashed<'a, D>(
&self,
prehashed_message: D,
public_key: &PublicKey,
context: Option<&'static [u8]>,
context: Option<&'a [u8]>,
) -> Signature
where
D: Digest<OutputSize = U64>,