10 Commits

Author SHA1 Message Date
Ivan Boldyrev
6c03b8c6ae Merge branch 'master' into rand-feature 2023-10-02 16:36:16 +04:00
João Oliveira
7f92cb0725
feat(quic): support stateless resets
Resolves #3419.

Pull-Request: #4554.
2023-10-02 00:28:32 +00:00
Thomas Eizinger
3bce9ebddf
refactor(identity): fix clippy beta lint
From the lint documentation:

> If both `PartialOrd` and `Ord` are implemented, they must agree. This is commonly done by wrapping the result of `cmp` in `Some` for `partial_cmp`. Not doing this may silently introduce an error upon refactoring.

Pull-Request: #4379.
2023-08-24 06:01:19 +00:00
Ivan Boldyrev
79b3bdd79f Merge branch 'master' into rand-feature 2023-08-19 23:17:06 +04:00
Ivan Boldyrev
9f69eabaaf feat(identity)!: make rand optional
Some restricted environments lack proper random source, and `getrandom` crate
fails to compile.  However, random sources is needed only for random key
generation which is not always required.

This change introduces `rand` feature flag that is gate to all the
functionality that requires `rand` crate.
2023-08-19 23:02:31 +04:00
João Oliveira
fb61697390
deps(identity): update ed25519-dalek to 2.0
Pull-Request: #4337.
2023-08-18 10:03:22 +02:00
Thomas Coratger
3cc6c7e080
feat(identity): remove deprecated items
Related: https://github.com/libp2p/rust-libp2p/issues/3647.

Pull-Request: #3928.
2023-05-15 11:39:54 +00:00
DrHuangMHT
058c2d85ec
refactor(identity): follow naming conventions for conversion methods
This PR renames some method names that don't follow Rust naming conventions or behave differently from what the name suggests:
- Enforce "try" prefix on all methods that return `Result`.
- Enforce "encode" method name for methods that return encoded bytes.
- Enforce "to_bytes" method name for methods that return raw bytes.
- Enforce "decode" method name for methods that convert encoded key.
- Enforce "from_bytes" method name for methods that convert raw bytes.

Pull-Request: #3775.
2023-04-14 08:55:13 +00:00
Thomas Eizinger
75f967f4da
refactor(identity): leverage Copy impl for ed25519 public key
No need for function calls to `to_bytes` and `from_bytes` if the type is `Copy`.

Related: #3649.

Pull-Request: #3706.
2023-03-30 11:07:37 +00:00
Thomas Eizinger
2a14df25eb
feat: introduce libp2p-identity crate
This patch combines the `libp2p_core::identity` and `libp2p_core::peer_id` modules into a new crate: `libp2p-identity`.

Resolves https://github.com/libp2p/rust-libp2p/issues/3349.

Pull-Request: #3350.
2023-03-12 15:46:58 +01:00