Skip to content

Commit 168d7fa

Browse files
committed
SignatureScheme::Input used in Signer::sign
1 parent 74f2092 commit 168d7fa

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/target
2+
Cargo.lock

src/signature_scheme.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
pub trait SignatureScheme {
66
type PublicKey;
77
type Signature;
8+
type Input;
89
}

src/signer.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ use crate::SignatureScheme;
1515
#[cfg_attr(feature = "send-sync-storage", async_trait)]
1616
pub trait Signer<K: SignatureScheme> {
1717
type KeyId;
18-
async fn sign(&self, data: &[u8]) -> Result<K::Signature>;
18+
19+
async fn sign(&self, data: &K::Input) -> Result<K::Signature>;
20+
1921
async fn public_key(&self) -> Result<K::PublicKey>;
22+
2023
fn key_id(&self) -> &Self::KeyId;
2124
}

0 commit comments

Comments
 (0)