wiggles

Follows you

awooo

📍seapple


wiggles
@wiggles

can someone help me use the pbkdf2 crate (@iliana??)

what am i supposed to use for the PRF type param in pbkdf2::pbkdf2?

working on rust bindings for the cohost api


wiggles
@wiggles

wait this website is so good for talking about computers. check this out

   Compiling cohost v0.1.0 (/Users/wiggles/code/cohost.rs)
warning: unused import: `Serialize`
 --> src/lib.rs:4:26
  |
4 | use serde::{Deserialize, Serialize};
  |                          ^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error[E0277]: the trait bound `(): digest::FixedOutput` is not satisfied
   --> src/lib.rs:49:9
    |
49  |         pbkdf2::<()>(password.expose_secret().as_bytes(), &decoded_salt, PBKDF2_ROUNDS, &mut hashed_password);
    |         ^^^^^^^^^^^^ the trait `digest::FixedOutput` is not implemented for `()`
    |
    = help: the trait `digest::FixedOutput` is implemented for `digest::core_api::wrapper::CoreWrapper<T>`
note: required by a bound in `pbkdf2`
   --> /Users/wiggles/.cargo/registry/src/github.com-1ecc6299db9ec823/pbkdf2-0.11.0/src/lib.rs:122:29
    |
122 |     PRF: KeyInit + Update + FixedOutput + Clone + Sync,
    |                             ^^^^^^^^^^^ required by this bound in `pbkdf2`

error[E0277]: the trait bound `(): crypto_common::InnerInit` is not satisfied
   --> src/lib.rs:49:9
    |
49  |         pbkdf2::<()>(password.expose_secret().as_bytes(), &decoded_salt, PBKDF2_ROUNDS, &mut hashed_password);
    |         ^^^^^^^^^^^^ the trait `crypto_common::InnerInit` is not implemented for `()`
    |
    = help: the trait `crypto_common::KeyInit` is implemented for `digest::core_api::wrapper::CoreWrapper<T>`
    = note: required because of the requirements on the impl of `crypto_common::KeyInit` for `()`
note: required by a bound in `pbkdf2`
   --> /Users/wiggles/.cargo/registry/src/github.com-1ecc6299db9ec823/pbkdf2-0.11.0/src/lib.rs:122:10
    |
122 |     PRF: KeyInit + Update + FixedOutput + Clone + Sync,
    |          ^^^^^^^ required by this bound in `pbkdf2`

For more information about this error, try `rustc --explain E0277`.
warning: `cohost` (lib) generated 1 warning
error: could not compile `cohost` due to 2 previous errors; 1 warning emitted

this is cargo build --color=always | ansi2html --inline | pbcopy wrapped in a <pre style="line-height: 1em;font-family: 'PragmataPro', 'PragmataPro Mono', monospace;">


You must log in to comment.

in reply to @wiggles's post:

in reply to @wiggles's post: