dalek-cryptography / curve25519-dalek

A pure-Rust implementation of group operations on Ristretto and Curve25519
Other
853 stars 422 forks source link

ed25519_dalek No generate function #614

Closed programskillforverification closed 6 months ago

programskillforverification commented 6 months ago

I am trying to run code provided in document.

1

The compiler tell me:

let signing_key: SigningKey = SigningKey::generate(&mut csprng); | ^^^^^^^^ function or associated item not found in SigningKey

This is my dependencies [dependencies] ed25519-dalek = "2.1.0" rand = "0.8.5"

robjtede commented 6 months ago

As documented, a crate feature is required:

ed25519-dalek = { version = "...", features = ["rand_core"] } 
programskillforverification commented 6 months ago

As documented, a crate feature is required:

ed25519-dalek = { version = "...", features = ["rand_core"] } 

Thanks a lot!