Skip to content
Snippets Groups Projects
Commit 467daf0b authored by nanocryk's avatar nanocryk
Browse files

Merge branch...

Merge branch '31-rename-duniter-keys-to-duniter-crypto-to-provide-all-nececary-crypto-bluiding-blocks-keys-hashes-maybe-others' into 'dev'

Resolve "Rename `duniter-keys` to `duniter-crypto` to provide all nececary crypto bluiding blocks (keys, hashes, maybe others)"

Closes #31

See merge request !22
parents 30ab4d51 80e64258
No related branches found
No related tags found
1 merge request!22Resolve "Rename `duniter-keys` to `duniter-crypto` to provide all nececary crypto bluiding blocks (keys, hashes, maybe others)"
......@@ -40,8 +40,8 @@ version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "duniter-keys"
version = "0.3.0"
name = "duniter-crypto"
version = "0.1.0"
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)",
......@@ -50,11 +50,11 @@ dependencies = [
[[package]]
name = "duniter-protocol"
version = "0.2.0"
version = "0.3.0"
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-keys 0.3.0",
"duniter-crypto 0.1.0",
"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)",
......
[workspace]
members = [
"wotb",
"keys",
"crypto",
"protocol",
]
[package]
name = "duniter-keys"
version = "0.3.0"
name = "duniter-crypto"
version = "0.1.0"
authors = ["nanocryk <nanocryk@duniter.org>"]
description = "Manage cryptographic keys for the Duniter project."
description = "Manage cryptographic building blocks for the Duniter project."
repository = "https://git.duniter.org/nodes/rust/duniter-rs"
readme = "README.md"
keywords = ["duniter", "keys", "cryptography"]
......
# crypto
`duniter-crypto` is a crate managing cryptographic building blocks for the Duniter project.
## How to use it
You can add `duniter-crypto` as a `cargo` dependency in your Rust project.
......@@ -312,7 +312,7 @@ impl KeyPairFromSaltedPasswordGenerator {
#[cfg(test)]
mod tests {
use super::*;
use {KeyPair, Signature};
use keys::{KeyPair, Signature};
#[test]
fn base58_private_key() {
......
......@@ -21,8 +21,8 @@
//! # Usage
//!
//! ```
//! use duniter_keys::{Signature, PublicKey, PrivateKey, KeyPair};
//! use duniter_keys::ed25519::KeyPairFromSaltedPasswordGenerator;
//! use duniter_crypto::keys::{Signature, PublicKey, PrivateKey, KeyPair};
//! use duniter_crypto::keys::ed25519::KeyPairFromSaltedPasswordGenerator;
//!
//! let generator = KeyPairFromSaltedPasswordGenerator::with_default_parameters();
//!
......@@ -46,14 +46,6 @@
//! `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`
//! with `=` as padding character.
#![deny(missing_docs, missing_debug_implementations, missing_copy_implementations, trivial_casts,
trivial_numeric_casts, unsafe_code, unstable_features, unused_import_braces,
unused_qualifications)]
extern crate base58;
extern crate base64;
extern crate crypto;
use std::fmt::Display;
use std::fmt::Debug;
......
// Copyright (C) 2018 The Duniter Project Developers.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//! Provide wrappers for cryptographic building blocks used by Duniter.
#![deny(missing_docs, missing_debug_implementations, missing_copy_implementations, trivial_casts,
trivial_numeric_casts, unsafe_code, unstable_features, unused_import_braces,
unused_qualifications)]
extern crate base58;
extern crate base64;
extern crate crypto;
pub mod keys;
# keys
`keys` is a crate managing cryptographic keys for the Duniter project.
[Duniter]: https://duniter.org/en/
## How to use it
You can add `duniter-keys` as a `cargo` dependency in your Rust project.
[package]
name = "duniter-protocol"
version = "0.2.0"
version = "0.3.0"
authors = ["nanocryk <nanocryk@duniter.org>"]
description = "Implements the Duniter Protocol"
repository = "https://git.duniter.org/nodes/rust/duniter-rs"
......@@ -18,4 +18,4 @@ base58 = "0.1.0"
base64 = "0.8.0"
lazy_static = "1.0.0"
regex = "0.2"
duniter-keys = { path = "../keys" }
duniter-crypto = { path = "../crypto" }
......@@ -17,7 +17,7 @@
use std::fmt::Debug;
use duniter_keys::{PrivateKey, PublicKey};
use duniter_crypto::keys::{PrivateKey, PublicKey};
pub mod v10;
......@@ -138,7 +138,7 @@ pub trait DocumentParser<S, D, E> {
#[cfg(test)]
mod tests {
use super::*;
use duniter_keys::{Signature, ed25519};
use duniter_crypto::keys::{Signature, ed25519};
// simple text document for signature testing
#[derive(Debug, Clone)]
......
......@@ -15,7 +15,7 @@
//! Wrappers around Identity documents.
use duniter_keys::{PublicKey, ed25519};
use duniter_crypto::keys::{PublicKey, ed25519};
use regex::Regex;
use Blockstamp;
......@@ -198,7 +198,7 @@ impl StandardTextDocumentParser for IdentityDocumentParser {
#[cfg(test)]
mod tests {
use super::*;
use duniter_keys::{PrivateKey, PublicKey, Signature};
use duniter_crypto::keys::{PrivateKey, PublicKey, Signature};
use blockchain::VerificationResult;
#[test]
......
......@@ -15,7 +15,7 @@
//! Provide wrappers around Duniter blockchain documents for protocol version 10.
use duniter_keys::{Signature, ed25519};
use duniter_crypto::keys::{Signature, ed25519};
use regex::Regex;
use blockchain::{Document, DocumentBuilder, DocumentParser};
use blockchain::v10::documents::identity::IdentityDocumentParser;
......@@ -99,7 +99,7 @@ pub trait TextDocumentBuilder: DocumentBuilder {
&self,
private_keys: Vec<ed25519::PrivateKey>,
) -> (String, Vec<ed25519::Signature>) {
use duniter_keys::PrivateKey;
use duniter_crypto::keys::PrivateKey;
let text = self.generate_text();
......
......@@ -22,7 +22,7 @@
extern crate base58;
extern crate base64;
extern crate crypto;
extern crate duniter_keys;
extern crate duniter_crypto;
#[macro_use]
extern crate lazy_static;
extern crate linked_hash_map;
......@@ -30,7 +30,7 @@ extern crate regex;
use std::fmt::{Debug, Display, Error, Formatter};
use duniter_keys::BaseConvertionError;
use duniter_crypto::keys::BaseConvertionError;
pub mod blockchain;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment