Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

ethcrypto renamed to ethcore-crypto and moved to ethcore dir #8340

Merged
merged 4 commits into from
Apr 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ethcrypto/Cargo.toml → ethcore/crypto/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "ethcrypto"
name = "ethcore-crypto"
version = "0.1.0"
authors = ["Parity Technologies <[email protected]>"]

[dependencies]
rust-crypto = "0.2.36"
tiny-keccak = "1.3"
eth-secp256k1 = { git = "https://github.com/paritytech/rust-secp256k1", optional = true }
ethkey = { path = "../ethkey", optional = true }
ethkey = { path = "../../ethkey", optional = true }
ethereum-types = "0.3"
subtle = "0.5"

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion ethcore/private-tx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ ethabi-contract = "5.0"
ethabi-derive = "5.0"
ethcore = { path = ".." }
ethcore-bytes = { path = "../../util/bytes" }
ethcore-crypto = { path = "../crypto" }
ethcore-io = { path = "../../util/io" }
ethcore-logger = { path = "../../logger" }
ethcore-miner = { path = "../../miner" }
ethcore-transaction = { path = "../transaction" }
ethcrypto = { path = "../../ethcrypto" }
ethereum-types = "0.3"
ethjson = { path = "../../json" }
ethkey = { path = "../../ethkey" }
Expand Down
8 changes: 4 additions & 4 deletions ethcore/private-tx/src/encryptor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use ethcore::account_provider::AccountProvider;
use ethereum_types::{H128, H256, Address};
use ethjson;
use ethkey::{Signature, Public};
use ethcrypto;
use crypto;
use futures::Future;
use fetch::{Fetch, Client as FetchClient, Method, BodyReader};
use bytes::{Bytes, ToPretty};
Expand Down Expand Up @@ -148,7 +148,7 @@ impl SecretStoreEncryptor {
let password = find_account_password(&self.config.passwords, &*accounts, &requester);

// decrypt Public
let decrypted_bytes = accounts.decrypt(requester, password, &ethcrypto::DEFAULT_MAC, &encrypted_bytes)?;
let decrypted_bytes = accounts.decrypt(requester, password, &crypto::DEFAULT_MAC, &encrypted_bytes)?;
let decrypted_key = Public::from_slice(&decrypted_bytes);

// and now take x coordinate of Public as a key
Expand Down Expand Up @@ -214,7 +214,7 @@ impl Encryptor for SecretStoreEncryptor {
// encrypt data
let mut cypher = Vec::with_capacity(plain_data.len() + initialisation_vector.len());
cypher.extend(repeat(0).take(plain_data.len()));
ethcrypto::aes::encrypt(&key, initialisation_vector, plain_data, &mut cypher);
crypto::aes::encrypt(&key, initialisation_vector, plain_data, &mut cypher);
cypher.extend_from_slice(&initialisation_vector);

Ok(cypher)
Expand All @@ -240,7 +240,7 @@ impl Encryptor for SecretStoreEncryptor {
let (cypher, iv) = cypher.split_at(cypher_len - INIT_VEC_LEN);
let mut plain_data = Vec::with_capacity(cypher_len - INIT_VEC_LEN);
plain_data.extend(repeat(0).take(cypher_len - INIT_VEC_LEN));
ethcrypto::aes::decrypt(&key, &iv, cypher, &mut plain_data);
crypto::aes::decrypt(&key, &iv, cypher, &mut plain_data);

Ok(plain_data)
}
Expand Down
6 changes: 3 additions & 3 deletions ethcore/private-tx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ mod messages;
mod error;

extern crate ethcore;
extern crate ethcore_io as io;
extern crate ethcore_bytes as bytes;
extern crate ethcore_transaction as transaction;
extern crate ethcore_crypto as crypto;
extern crate ethcore_io as io;
extern crate ethcore_miner;
extern crate ethcrypto;
extern crate ethcore_transaction as transaction;
extern crate ethabi;
extern crate ethereum_types;
extern crate ethkey;
Expand Down
2 changes: 1 addition & 1 deletion ethstore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tiny-keccak = "1.3"
time = "0.1.34"
itertools = "0.5"
parking_lot = "0.5"
ethcrypto = { path = "../ethcrypto" }
ethcore-crypto = { path = "../ethcore/crypto" }
ethereum-types = "0.3"
dir = { path = "../util/dir" }
smallvec = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion ethstore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ extern crate time;
extern crate tiny_keccak;
extern crate tempdir;

extern crate ethcrypto as crypto;
extern crate ethcore_crypto as crypto;
extern crate ethereum_types;
extern crate ethkey as _ethkey;
extern crate parity_wordlist;
Expand Down
2 changes: 1 addition & 1 deletion rpc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jsonrpc-pubsub = { git = "https://github.com/paritytech/jsonrpc.git", branch = "
ethash = { path = "../ethash" }
ethcore = { path = "../ethcore" }
ethcore-bytes = { path = "../util/bytes" }
ethcore-crypto = { path = "../ethcore/crypto" }
ethcore-devtools = { path = "../devtools" }
ethcore-io = { path = "../util/io" }
ethcore-light = { path = "../ethcore/light" }
Expand All @@ -49,7 +50,6 @@ ethcore-sync = { path = "../ethcore/sync" }
ethcore-transaction = { path = "../ethcore/transaction" }
ethereum-types = "0.3"

ethcrypto = { path = "../ethcrypto" }
ethjson = { path = "../json" }
ethkey = { path = "../ethkey" }
ethstore = { path = "../ethstore" }
Expand Down
2 changes: 1 addition & 1 deletion rpc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ extern crate jsonrpc_pubsub;
extern crate ethash;
extern crate ethcore;
extern crate ethcore_bytes as bytes;
extern crate ethcore_crypto as crypto;
extern crate ethcore_devtools as devtools;
extern crate ethcore_io as io;
extern crate ethcore_light as light;
Expand All @@ -54,7 +55,6 @@ extern crate ethcore_miner as miner;
extern crate ethcore_private_tx;
extern crate ethcore_sync as sync;
extern crate ethcore_transaction as transaction;
extern crate ethcrypto as crypto;
extern crate ethereum_types;
extern crate ethkey;
extern crate ethstore;
Expand Down
4 changes: 2 additions & 2 deletions secret_store/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ tokio-proto = "0.1"
url = "1.0"
ethcore = { path = "../ethcore" }
ethcore-bytes = { path = "../util/bytes" }
ethcore-crypto = { path = "../ethcore/crypto" }
ethcore-logger = { path = "../logger" }
ethcore-sync = { path = "../ethcore/sync" }
ethcore-transaction = { path = "../ethcore/transaction" }
ethereum-types = "0.3"
kvdb = { path = "../util/kvdb" }
kvdb-rocksdb = { path = "../util/kvdb-rocksdb" }
keccak-hash = { path = "../util/hash" }
ethcore-logger = { path = "../logger" }
ethcrypto = { path = "../ethcrypto" }
ethkey = { path = "../ethkey" }
lazy_static = "1.0"
ethabi = "5.1"
Expand Down
Loading