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

* ethcrypto renamed to ethcore-crypto and moved to ethcore dir

* fixed renaming
This commit is contained in:
Marek Kotewicz
2018-04-10 13:56:56 +02:00
committed by GitHub
parent 4f447c50b2
commit bd7273061e
27 changed files with 77 additions and 76 deletions

View File

@@ -9,7 +9,7 @@ bitflags = "0.9"
byteorder = "1.0.0"
ethereum-types = "0.3"
ethcore-network = { path = "../util/network" }
ethcrypto = { path = "../ethcrypto" }
ethcore-crypto = { path = "../ethcore/crypto" }
ethkey = { path = "../ethkey" }
hex = "0.2"
log = "0.3"

View File

@@ -18,8 +18,8 @@
//! interface.
extern crate byteorder;
extern crate ethcore_crypto as crypto;
extern crate ethcore_network as network;
extern crate ethcrypto;
extern crate ethereum_types;
extern crate ethkey;
extern crate hex;

View File

@@ -16,6 +16,7 @@
//! Encryption schemes supported by RPC layer.
use crypto;
use ethereum_types::H256;
use ethkey::{self, Public, Secret};
use ring::aead::{self, AES_256_GCM, SealingKey, OpeningKey};
@@ -117,7 +118,7 @@ impl EncryptionInstance {
}
}
EncryptionInner::ECIES(valid_public) => {
::ethcrypto::ecies::encrypt(&valid_public, &[], plain)
crypto::ecies::encrypt(&valid_public, &[], plain)
.expect("validity of public key an invariant of the type; qed")
}
}
@@ -213,7 +214,7 @@ impl DecryptionInstance {
}
DecryptionInner::ECIES(secret) => {
// secret is checked for validity, so only fails on invalid message.
::ethcrypto::ecies::decrypt(&secret, &[], ciphertext).ok()
crypto::ecies::decrypt(&secret, &[], ciphertext).ok()
}
}
}