Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Dunitrust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nodes
rust
Dunitrust
Commits
adcf0a60
Commit
adcf0a60
authored
7 years ago
by
Éloïs
Browse files
Options
Downloads
Plain Diff
Merge branch '37-crypto-keys-impl-hash-trait-for-pubkey' into dev
parents
db4fba72
85716921
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Cargo.lock
+41
-29
41 additions, 29 deletions
Cargo.lock
crypto/Cargo.toml
+1
-1
1 addition, 1 deletion
crypto/Cargo.toml
crypto/keys/ed25519.rs
+1
-1
1 addition, 1 deletion
crypto/keys/ed25519.rs
crypto/keys/mod.rs
+2
-1
2 additions, 1 deletion
crypto/keys/mod.rs
with
45 additions
and
32 deletions
Cargo.lock
+
41
−
29
View file @
adcf0a60
...
...
@@ -85,7 +85,7 @@ dependencies = [
[[package]]
name = "duniter-crypto"
version = "0.1.
0
"
version = "0.1.
1
"
dependencies = [
"base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"base64 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
...
...
@@ -98,10 +98,10 @@ version = "0.4.1"
dependencies = [
"base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"base64 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"duniter-crypto 0.1.
0
",
"duniter-crypto 0.1.
1
",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"linked-hash-map 0.5.
0
(registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.
5
(registry+https://github.com/rust-lang/crates.io-index)",
"linked-hash-map 0.5.
1
(registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.
6
(registry+https://github.com/rust-lang/crates.io-index)",
"rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
]
...
...
@@ -152,12 +152,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "libc"
version = "0.2.3
5
"
version = "0.2.3
7
"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "linked-hash-map"
version = "0.5.
0
"
version = "0.5.
1
"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
...
...
@@ -165,7 +165,7 @@ name = "memchr"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.3
5
(registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.3
7
(registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
...
...
@@ -183,7 +183,7 @@ name = "num_cpus"
version = "1.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.3
5
(registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.3
7
(registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
...
...
@@ -193,11 +193,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "rand"
version = "0.3.20"
version = "0.3.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rand"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
...
...
@@ -216,9 +227,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"crossbeam-deque 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.3
5
(registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.3
7
(registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.
3
.2
0
(registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.
4
.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
...
...
@@ -228,7 +239,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "regex"
version = "0.2.
5
"
version = "0.2.
6
"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"aho-corasick 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)",
...
...
@@ -249,8 +260,8 @@ version = "0.2.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.3
5
(registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.2
0
(registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.3
7
(registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.2
2
(registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
]
...
...
@@ -326,9 +337,9 @@ name = "time"
version = "0.1.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.3
5
(registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.3
7
(registry+https://github.com/rust-lang/crates.io-index)",
"redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.
3
(registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.3.
4
(registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
...
...
@@ -356,21 +367,21 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi"
version = "0.3.
3
"
version = "0.3.
4
"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi-i686-pc-windows-gnu 0.
3.2
(registry+https://github.com/rust-lang/crates.io-index)",
"winapi-x86_64-pc-windows-gnu 0.
3.2
(registry+https://github.com/rust-lang/crates.io-index)",
"winapi-i686-pc-windows-gnu 0.
4.0
(registry+https://github.com/rust-lang/crates.io-index)",
"winapi-x86_64-pc-windows-gnu 0.
4.0
(registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.
3.2
"
version = "0.
4.0
"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.
3.2
"
version = "0.
4.0
"
source = "registry+https://github.com/rust-lang/crates.io-index"
[metadata]
...
...
@@ -391,18 +402,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb"
"checksum lazy_static 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73"
"checksum lazy_static 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c8f31047daa365f19be14b47c29df4f7c3b581832407daabe6ae77397619237d"
"checksum libc 0.2.3
5
(registry+https://github.com/rust-lang/crates.io-index)" = "
96264e9b293e95d25bfcbbf8a88ffd1aedc85b754eba8b7d78012f638ba220eb
"
"checksum linked-hash-map 0.5.
0
(registry+https://github.com/rust-lang/crates.io-index)" = "
2d2aab0478615bb586559b0114d94dd8eca4fdbb73b443adcb0d00b61692b4bf
"
"checksum libc 0.2.3
7
(registry+https://github.com/rust-lang/crates.io-index)" = "
56aebce561378d99a0bb578f8cb15b6114d2a1814a6c7949bbe646d968bb4fa9
"
"checksum linked-hash-map 0.5.
1
(registry+https://github.com/rust-lang/crates.io-index)" = "
70fb39025bc7cdd76305867c4eccf2f2dcf6e9a57f5b21a93e1c2d86cd03ec9e
"
"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d"
"checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2"
"checksum num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "c51a3322e4bca9d212ad9a158a02abc6934d005490c054a2778df73a70aa0a30"
"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
"checksum rand 0.3.20 (registry+https://github.com/rust-lang/crates.io-index)" = "512870020642bb8c221bf68baa1b2573da814f6ccfe5c9699b1c303047abe9b1"
"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1"
"checksum rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "eba5f8cb59cc50ed56be8880a5c7b496bfd9bd26394e176bc67884094145c2c5"
"checksum rayon 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "485541959c8ecc49865526fe6c4de9653dd6e60d829d6edf0be228167b60372d"
"checksum rayon-core 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9d24ad214285a7729b174ed6d3bcfcb80177807f959d95fafd5bfc5c4f201ac8"
"checksum redox_syscall 0.1.37 (registry+https://github.com/rust-lang/crates.io-index)" = "0d92eecebad22b767915e4d529f89f28ee96dbbf5a4810d2b844373f136417fd"
"checksum regex 0.2.
5
(registry+https://github.com/rust-lang/crates.io-index)" = "
744554e01ccbd98fff8c457c3b092cd67af62a555a43bfe97ae8a0451f7799fa
"
"checksum regex 0.2.
6
(registry+https://github.com/rust-lang/crates.io-index)" = "
5be5347bde0c48cfd8c3fdc0766cdfe9d8a755ef84d620d6794c778c91de8b2b
"
"checksum regex-syntax 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8e931c58b93d86f080c734bfd2bce7dd0079ae2331235818133c8be7f422e20e"
"checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a"
"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
...
...
@@ -419,6 +431,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
"checksum utf8-ranges 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "662fab6525a98beff2921d7f61a39e7d59e0b425ebc7d0d9e66d316e55124122"
"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
"checksum winapi 0.3.
3
(registry+https://github.com/rust-lang/crates.io-index)" = "
b09fb3b6f248ea4cd42c9a65113a847d612e17505d6ebd1f7357ad68a8bf869
3"
"checksum winapi-i686-pc-windows-gnu 0.
3.2
(registry+https://github.com/rust-lang/crates.io-index)" = "
ec6667f60c23eca65c561e63a13d81b44234c2e38a6b6c959025ee907ec614cc
"
"checksum winapi-x86_64-pc-windows-gnu 0.
3.2
(registry+https://github.com/rust-lang/crates.io-index)" = "
98f12c52b2630cd05d2c3ffd8e008f7f48252c042b4871c72aed9dc733b96668
"
"checksum winapi 0.3.
4
(registry+https://github.com/rust-lang/crates.io-index)" = "
04e3bd221fcbe8a271359c04f21a76db7d0c6028862d1bb5512d85e1e2eb5bb
3"
"checksum winapi-i686-pc-windows-gnu 0.
4.0
(registry+https://github.com/rust-lang/crates.io-index)" = "
ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6
"
"checksum winapi-x86_64-pc-windows-gnu 0.
4.0
(registry+https://github.com/rust-lang/crates.io-index)" = "
712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f
"
This diff is collapsed.
Click to expand it.
crypto/Cargo.toml
+
1
−
1
View file @
adcf0a60
[package]
name
=
"duniter-crypto"
version
=
"0.1.
0
"
version
=
"0.1.
1
"
authors
=
[
"nanocryk <nanocryk@duniter.org>"
]
description
=
"Manage cryptographic building blocks for the Duniter project."
repository
=
"https://git.duniter.org/nodes/rust/duniter-rs"
...
...
This diff is collapsed.
Click to expand it.
crypto/keys/ed25519.rs
+
1
−
1
View file @
adcf0a60
...
...
@@ -92,7 +92,7 @@ impl Eq for Signature {}
/// Can be generated with [`KeyPairGenerator`].
///
/// [`KeyPairGenerator`]: struct.KeyPairGenerator.html
#[derive(Copy,
Clone,
PartialEq,
Eq)]
#[derive(Copy,
Clone,
PartialEq,
Eq
,
Hash
)]
pub
struct
PublicKey
(
pub
[
u8
;
32
]);
impl
ToBase58
for
PublicKey
{
...
...
This diff is collapsed.
Click to expand it.
crypto/keys/mod.rs
+
2
−
1
View file @
adcf0a60
...
...
@@ -48,6 +48,7 @@
use
std
::
fmt
::
Display
;
use
std
::
fmt
::
Debug
;
use
std
::
hash
::
Hash
;
use
base58
::
ToBase58
;
...
...
@@ -97,7 +98,7 @@ pub trait Signature: Clone + Display + Debug + PartialEq + Eq {
/// with the associated [`PrivateKey`].
///
/// [`PrivateKey`]: trait.PrivateKey.html
pub
trait
PublicKey
:
Clone
+
Display
+
Debug
+
PartialEq
+
Eq
+
ToBase58
{
pub
trait
PublicKey
:
Clone
+
Display
+
Debug
+
PartialEq
+
Eq
+
Hash
+
ToBase58
{
/// Signature type of associated cryptosystem.
type
Signature
:
Signature
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment