You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use hmac::{Mac,SimpleHmac};use blake3::{Hasher};fnmain(){letmut x = SimpleHmac::<Hasher>::new_from_slice(b"test");
x.update(b"test2");println!("{:?}", x.finalize().into_bytes());}
error[E0599]: the function or associated item `new_from_slice` exists for struct `SimpleHmac<blake3::Hasher>`, but its trait bounds were not satisfied
--> src/main.rs:5:38
|
5 | let mut x = SimpleHmac::<Hasher>::new_from_slice(b"test").unwrap();
| ^^^^^^^^^^^^^^ function or associated item cannot be called on `SimpleHmac<blake3::Hasher>` due to unsatisfied trait bounds
|
::: /Users/joshuabrown3/.cargo/registry/src/github.com-1ecc6299db9ec823/hmac-0.12.0/src/simple.rs:14:1
|
14 | pub struct SimpleHmac<D:Digest + BlockSizeUser> {
| ------------------------------------------------
| |
| doesn't satisfy `SimpleHmac<blake3::Hasher>:FixedOutput`
| doesn't satisfy `SimpleHmac<blake3::Hasher>:KeyInit`
| doesn't satisfy `SimpleHmac<blake3::Hasher>:MacMarker`
| doesn't satisfy `SimpleHmac<blake3::Hasher>:Mac`
| doesn't satisfy `SimpleHmac<blake3::Hasher>:Sized`
| doesn't satisfy `SimpleHmac<blake3::Hasher>:Update`
|
= note: the following trait bounds were not satisfied:
`SimpleHmac<blake3::Hasher>:Sized`
which is required by `SimpleHmac<blake3::Hasher>:Mac`
`SimpleHmac<blake3::Hasher>:KeyInit`
which is required by `SimpleHmac<blake3::Hasher>:Mac`
`SimpleHmac<blake3::Hasher>:Update`
which is required by `SimpleHmac<blake3::Hasher>:Mac`
`SimpleHmac<blake3::Hasher>:FixedOutput`
which is required by `SimpleHmac<blake3::Hasher>:Mac`
`SimpleHmac<blake3::Hasher>:MacMarker`
which is required by `SimpleHmac<blake3::Hasher>:Mac`
`&SimpleHmac<blake3::Hasher>:KeyInit`
which is required by `&SimpleHmac<blake3::Hasher>:Mac`
`&SimpleHmac<blake3::Hasher>:Update`
which is required by `&SimpleHmac<blake3::Hasher>:Mac`
`&SimpleHmac<blake3::Hasher>:FixedOutput`
which is required by `&SimpleHmac<blake3::Hasher>:Mac`
`&SimpleHmac<blake3::Hasher>:MacMarker`
which is required by `&SimpleHmac<blake3::Hasher>:Mac`
`&mut SimpleHmac<blake3::Hasher>:KeyInit`
which is required by `&mut SimpleHmac<blake3::Hasher>:Mac`
`&mut SimpleHmac<blake3::Hasher>:Update`
which is required by `&mut SimpleHmac<blake3::Hasher>:Mac`
`&mut SimpleHmac<blake3::Hasher>:FixedOutput`
which is required by `&mut SimpleHmac<blake3::Hasher>:Mac`
`&mut SimpleHmac<blake3::Hasher>:MacMarker`
which is required by `&mut SimpleHmac<blake3::Hasher>:Mac`
error[E0277]: the trait bound `blake3::Hasher:BlockSizeUser` is not satisfied
--> src/main.rs:5:16
|
5 | let mut x = SimpleHmac::<Hasher>::new_from_slice(b"test").unwrap();
| ^^^^^^^^^^^^^^^^^^^^ the trait `BlockSizeUser` is not implemented for `blake3::Hasher`
|
note: required by a bound in `SimpleHmac`
--> /Users/joshuabrown3/.cargo/registry/src/github.com-1ecc6299db9ec823/hmac-0.12.0/src/simple.rs:14:35
|
14 | pub struct SimpleHmac<D:Digest + BlockSizeUser> {
| ^^^^^^^^^^^^^ required by this bound in `SimpleHmac`
This is with
[dependencies]
hmac = "0.12.0"
blake3 = { version = "1.3.0", features = ["traits-preview"]}
The text was updated successfully, but these errors were encountered:
This is with
The text was updated successfully, but these errors were encountered: